安装nodeclub的时候报错,给解答一下,这是什么原因?
这个是安装日志:
[root@AY121207113848efa6335 nodeclub]# make install
> bcrypt@0.8.0 install /mnt/nodeclub/node_modules/bcrypt
> node-gyp rebuild
make[1]: Entering directory `/mnt/nodeclub/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node: Finished
COPY Release/bcrypt_lib.node
make[1]: Leaving directory `/mnt/nodeclub/node_modules/bcrypt/build'
> kerberos@0.0.3 install /mnt/nodeclub/node_modules/connect-mongo/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make[1]: Entering directory `/mnt/nodeclub/node_modules/connect-mongo/node_modules/mongodb/node_modules/kerberos/build'
SOLINK_MODULE(target) Release/obj.target/kerberos.node
SOLINK_MODULE(target) Release/obj.target/kerberos.node: Finished
COPY Release/kerberos.node
make[1]: Leaving directory `/mnt/nodeclub/node_modules/connect-mongo/node_modules/mongodb/node_modules/kerberos/build'
> pm2@0.11.1 preinstall /mnt/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
#
#
#
######
/
> bson@0.2.5 install /mnt/nodeclub/node_modules/connect-mongo/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make[1]: Entering directory `/mnt/nodeclub/node_modules/connect-mongo/node_modules/mongodb/node_modules/bson/build'
CXX(target) Release/obj.target/bson/ext/bson.o
SOLINK_MODULE(target) Release/obj.target/bson.node
SOLINK_MODULE(target) Release/obj.target/bson.node: Finished
COPY Release/bson.node
make[1]: Leaving directory `/mnt/nodeclub/node_modules/connect-mongo/node_modules/mongodb/node_modules/bson/build'
npm WARN package.json proxying-agent@0.1.5 'repositories' (plural) Not supported. Please pick one as the 'repository' field
> kerberos@0.0.3 install /mnt/nodeclub/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make[1]: Entering directory `/mnt/nodeclub/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build'
SOLINK_MODULE(target) Release/obj.target/kerberos.node
SOLINK_MODULE(target) Release/obj.target/kerberos.node: Finished
COPY Release/kerberos.node
make[1]: Leaving directory `/mnt/nodeclub/node_modules/mongoose/node_modules/mongodb/node_modules/kerberos/build'
> bson@0.2.12 install /mnt/nodeclub/node_modules/mongoose/node_modules/mongodb/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make[1]: Entering directory `/mnt/nodeclub/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build'
CXX(target) Release/obj.target/bson/ext/bson.o
SOLINK_MODULE(target) Release/obj.target/bson.node
SOLINK_MODULE(target) Release/obj.target/bson.node: Finished
COPY Release/bson.node
make[1]: Leaving directory `/mnt/nodeclub/node_modules/mongoose/node_modules/mongodb/node_modules/bson/build'
npm ERR! pm2@0.11.1 preinstall: `bash ./scripts/preinstall.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pm2@0.11.1 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-220.13.1.el6.x86_64
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" ""
npm ERR! cwd /mnt/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
make: *** [install] Error 1
请问这是哪里出了问题。麻烦解答一下。
6 回复
@jiyinyiyong 装了PM2了,提示还是这样的。估计不是这个原因吧、第一次装,也不知道什么原因,
使用非root用户吧,根据日志里的说法,root用户安装pm2需要添加参数 --unsafe-perm, 但是现在PM2是作为一个依赖被安装,你可能没法加这个参数。
爷们儿,问题解决了么?
我在执行 npm install pm2 --unsafe-perm,之后解决了我的问题,你可以试试