64位centos下安装nodeclub报错
发布于 19天前 作者 vlover 236 次浏览 来自 问答

在根目录执行安装命令后,报错,报错内容如下,按照提示,使用 npm install pm2 -g --unsafe-perm命令安装后,依然没办法解决, 所以请问有遇到过类似情况的朋友么?可以帮忙解决下么? 谢谢!

[root@test nodeclub]# npm install
\
> [email protected] preinstall /alidata/server/nodeclub/node_modules/pm2
> bash ./scripts/preinstall.sh

##### PM2 INSTALLATION
#
#
# As you run PM2 as root, to update PM2 automatically
# you must add the --unsafe-perm flag.
#
#       $  npm install pm2 -g --unsafe-perm
#
# Else run the installation as a non root user
#
#
#
######


npm ERR! [email protected] preinstall: `bash ./scripts/preinstall.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the pm2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bash ./scripts/preinstall.sh
npm ERR! You can get their info via:
npm ERR!     npm owner ls pm2
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-358.6.2.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /alidata/server/nodeclub
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
2 回复

@alsotang 大侠,可以帮我看看么?

问题解决了, 执行npm install pm2 --unsafe-perm,去掉提示中得-g,虽然不报错了,但不知道为啥

回到顶部