Installation fail when prebuild command is called


#1

Hi all, I was using Ubuntu 15.04 and installing couchbase was a piece of cake. Now with Ubuntu 15.10, npm 1.4.21 and nodejs 0.10.25, I have this error instantly when trying to install couchbase:

$ sudo npm install couchbase
npm WARN engine hawk@3.1.0: wanted: {"node":">=0.10.32"} (current: {"node":"0.10.25","npm":"1.4.21"})
npm WARN engine boom@2.10.0: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.25","npm":"1.4.21"})
npm WARN engine cryptiles@2.0.5: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.25","npm":"1.4.21"})
npm WARN engine hoek@2.16.3: wanted: {"node":">=0.10.40"} (current: {"node":"0.10.25","npm":"1.4.21"})
|
> couchbase@2.1.2 install /usr/local/lib/node_modules/couchbase
> prebuild --download

/usr/bin/env: node: No file or folder of this type
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
 
npm ERR! couchbase@2.1.2 install: `prebuild --download`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the couchbase@2.1.2 install script.
npm ERR! This is most likely a problem with the couchbase package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     prebuild --download
npm ERR! You can get their info via:
npm ERR!     npm owner ls couchbase
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.2.0-16-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "couchbase"
npm ERR! cwd /home/path
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE

I have nothing in the npm-debug.log. Any clue of what’s happening? I tried to install node-gyp and g++ (both successfully), but this doesn’t help…

Thanks!

EDIT
I tried to rollback to Ubuntu 15.04 and problem presists. What should I do to, at least, find some clues to what happens? thanks


#2

Ok, don’t know if it’s related (because I tried lot of things, just now), but it seems that, in some circumstances, with Ubuntu at least, you can have problems with node and nodejs commands.

I installed the node-legacy package and it worled :smile:

More information here: https://askubuntu.com/questions/235655/node-js-conflicts-sbin-node-vs-usr-bin-node