安装pm2遇到问题,希望大家教我 sudo npm install -g pm2
发布于 1年前 作者 langzitxp 959 次浏览

npm http 304 http://registry.npmjs.org/bindings

usage@0.3.9 install /usr/local/lib/node_modules/pm2/node_modules/usage

node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.8.6/node-v0.8.6.tar.gz

gyp http 200 http://nodejs.org/dist/v0.8.6/node-v0.8.6.tar.gz

gyp ERR! UNCAUGHT EXCEPTION

gyp ERR! stack Error: EPERM, chmod ‘/home/leochen/.node-gyp/0.8.6’

gyp ERR! System Linux 2.6.32-37-generic-pae

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.8.6

gyp ERR! node-gyp -v v0.6.3

gyp ERR! This is a bug in node-gyp.

gyp ERR! Please file an Issue:

gyp ERR! https://github.com/TooTallNate/node-gyp/issues

npm ERR! usage@0.3.9 install: node-gyp rebuild

npm ERR! sh "-c" "node-gyp rebuild" failed with 7

npm ERR!

npm ERR! Failed at the usage@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-37-generic-pae

npm ERR! command “/usr/local/bin/node” “/usr/local/bin/npm” “install” "-g" “pm2”

npm ERR! cwd /home/leochen/yanyangserver/yanyangServer

npm ERR! node -v v0.8.6

npm ERR! npm -v 1.1.48

npm ERR! code ELIFECYCLE

npm http 304 http://registry.npmjs.org/keypress

npm ERR!

npm ERR! Additional logging details can be found in:

npm ERR! /home/leochen/yanyangserver/yanyangServer/npm-debug.log

npm ERR! not ok code 0

4 回复

gyp ERR! node -v v0.8.6

gyp ERR! node-gyp -v v0.6.3

这是什么意思,说详细点 是在不懂怎么回事

亲,这个问题你可以到PM2的issue里面看一下,是有的,我记得解决的办法貌似是在一个文件中安装pm2,然后移动这个PM2到全局的node_modules里面就可以了。

试下把.node-gyp文件夹删掉,然后重新安装。

当时我就是这样解决的。

回到顶部