TooTallNate / ref

Turn Buffer instances into "pointers"
http://tootallnate.github.com/ref
453 stars 141 forks source link

Fails to run "npm install ref" in Ubuntu 14.04 #21

Closed rodrigopandini closed 9 years ago

rodrigopandini commented 9 years ago

Seems that in https://github.com/TooTallNate/ref/blob/master/binding.gyp#L7 the node command should now be nodejs.

> ref@0.3.5 install /home/pandini/Documents/abc/node_modules/ref
> node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pandini/Documents/abc/node_modules/ref
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok 
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! weird error 1
npm ERR! not ok code 0

In "README.Debian" file:

nodejs command

The upstream name for the Node.js interpreter command is "node". In Debian the interpreter command has been changed to "nodejs".

This was done to prevent a namespace collision: other commands use the same name in their upstreams, such as ax25-node from the "node" package.

Scripts calling Node.js as a shell command must be changed to instead use the "nodejs" command.

TooTallNate commented 9 years ago
sudo apt-get install nodejs-legacy