下面是错误明细,我在一个新目录中使用npm install bcrypt也是一样的报错。我也通过 npm install nan 安装了。
[email protected] install /usr/test/nodeclub/node_modules/bcrypt node-gyp rebuild
/bin/sh: 1: node: Permission denied
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.0-30-generic
gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
gyp ERR! cwd /usr/test/nodeclub/node_modules/bcrypt
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
npm ERR! Linux 3.16.0-30-generic
npm ERR! argv “/root/nvm/versions/alinode/v4.0.0/bin/node” “/root/nvm/versions/alinode/v4.0.0/bin/npm” “install” “”
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild’.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /usr/test/nodeclub/npm-debug.log make: *** [install] 错误 1