OSError: [Errno 13] Permission denied
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 2.6.32-042stab083.2
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/pm2/node_modules/usage
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm http GET https://registry.npmjs.org/keypress
npm http 200 https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz
npm http 200 https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz
npm ERR! usage[@0](/user/0).3.9 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the usage[@0](/user/0).3.9 install script.
npm ERR! This is most likely a problem with the usage 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 usage
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-042stab083.2
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "pm2" "-g"
npm ERR! cwd /usr/src/node-v0.10.24
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/src/node-v0.10.24/npm-debug.log
npm ERR! not ok code 0
求教新弄了个VPS 结果安装 npm install pm2 -g
报错 请问咋回事?
补充一下 运行 npm install pm2 -g 会报错 运行 sudo npm install pm2 -g 提示 sudo:npm:找不到命令
系统是 centos6 64位
18 回复
which node 返回 /usr/local/bin/node 这样对么?
我是下的源码 然后直接 make install .
我现在node能跑,forever能跑,就是pm2安装不上 好郁闷.
前面能成功是因为 npm install 的默认路径是 ~/.npm 一般都有权限…
sudo 不成功要么是脚本没有可执行权限,或者 sudo 的 PATH 跟当前帐号不一样。
http://stackoverflow.com/questions/12996397/command-not-found-when-using-sudo
跟你贴的这个issue 应该关系不大…