安装nodeclub的时候报错,给解答一下,这是什么原因?
发布于 23天前 作者 dxhuii 429 次浏览 来自 问答

这个是安装日志:

[root@AY121207113848efa6335 nodeclub]# make install
 
> [email protected] 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'
 
> [email protected] 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'
 
> [email protected] 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
#
#
#
######

/
> [email protected] 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 [email protected] 'repositories' (plural) Not supported. Please pick one as the 'repository' field

> [email protected] 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'
 
> [email protected] 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! [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-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 回复

看中间的是 pm2 preinstall 报的错, 楼主的 pm2 安装正常否?

@jiyinyiyong 装了PM2了,提示还是这样的。估计不是这个原因吧、第一次装,也不知道什么原因,

无能为力了… 网上再找找吧…

使用非root用户吧,根据日志里的说法,root用户安装pm2需要添加参数 --unsafe-perm, 但是现在PM2是作为一个依赖被安装,你可能没法加这个参数。

爷们儿,问题解决了么?

我在执行 npm install pm2 --unsafe-perm,之后解决了我的问题,你可以试试

回到顶部