Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Install fails on linux distributions that use "nodejs" as the binary name #136

Closed
aez opened this issue Nov 25, 2014 · 1 comment
Closed

Comments

@aez
Copy link

aez commented Nov 25, 2014

Installing contextify on latest Ubuntu (via docker in our case) fails:

The culprit seems to be binding.gyp, which specifies the binary as 'node' - on this distro, the binary is 'nodejs'.

> [email protected] install /code/node_modules/librato-node/node_modules/d3/node_modules/jsdom/node_modules/contextify
> node-gyp rebuild

npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/isarray/0.0.1
npm http GET https://registry.npmjs.org/string_decoder
npm http GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/isarray/0.0.1
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/core-util-is
npm http 304 https://registry.npmjs.org/string_decoder
/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.16.4-tinycore64
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /code/node_modules/librato-node/node_modules/d3/node_modules/jsdom/node_modules/contextify
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

Within npm, the $NODE environment variable is the node executable.

@kkoopa
Copy link
Collaborator

kkoopa commented Nov 27, 2014

This cannot be fixed. It is an unfortunate decision of Debian and its followers to arbitrarily change the names of files. You have three options:

  1. Install a proper build of node.js with original file names
  2. Install the nodejs-legacy package, which adds a symlink node -> nodejs
  3. Make the symlinks yourself

@kkoopa kkoopa closed this as completed Dec 12, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants