-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fails to install on ubuntu14.04 because "nodejs" not "node" is the binary name of node.js on debian #458
Comments
This happens if you apt-get install nodejs package from Ubuntu. This is not the latest 0.10.x version. Here is a solution which I verified works, as suggested here: project ungit issue 401
Though, if you use the recommended Node install procedure for Ubuntu, this issue will also not occur. This will install the latest 0.10.x version, and also resolve your issue. |
Closed based on the commented above. |
The upstream name for the Node.js interpreter command is `node`. Thus, modern distributions ship Node.js binary under `/usr/bin/node`; but Debian uses the `nodejs` (because of a namespace collision with `ax25-node`). Parallely, major Node.js projects use `node` (not `nodejs`), for example [NPM](https://github.com/npm/npm/blob/master/bin/npm-cli.js#L1), [Jade](https://github.com/pugjs/pug-cli/blob/master/index.js#L1), [Gulp](https://github.com/gulpjs/gulp/blob/master/bin/gulp.js#L1)... This commit changes scripts to use `node` binary instead of `nodejs`, for interoperability reasons. FWIW, some Debian & Ubuntu users recommend [symlinking `node`](websockets/ws#458) or [installing nodejs-legacy](http://stackoverflow.com/a/21171188).
/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: 1gyp 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-26-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/muenalan/http/mue-nodejs/cc_materialize/node_modules/ws/node_modules/utf-8-validate
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
$ less /usr/share/doc/nodejs/README.Debian
[snip]
The text was updated successfully, but these errors were encountered: