npm无法安装fabric-ca-client

我们在CentOS 7.3和RHEL 7.3上都遇到了问题,试图安装最新的NodeJs fabric-ca-client

这是一个完整的清单:

sudo npm install -g fabric-ca-client@1.0.0 > x509@0.3.2 install /usr/lib/node_modules/fabric-ca-client/node_modules/x509 > node-gyp rebuild gyp ERR! clean error gyp ERR! stack Error: EACCES: permission denied, rmdir 'build' gyp ERR! stack at Error (native) gyp ERR! System Linux 3.10.0-514.el7.x86_64 gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/lib/node_modules/fabric-ca-client/node_modules/x509 gyp ERR! node -v v6.11.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! x509@0.3.2 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the x509@0.3.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2017-07-19T14_02_06_503Z-debug.log 

2017-07-19T14_02_06_503Z-debug.log中的列表包含以下内容:

 1666 silly install x509@0.3.2 1667 info lifecycle x509@0.3.2~install: x509@0.3.2 1668 verbose lifecycle x509@0.3.2~install: unsafe-perm in lifecycle false 1669 verbose lifecycle x509@0.3.2~install: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/usr/lib/node_modules/fabric-ca-client/node_modules/x509/node_modules/.bin:/usr/lib/node_modules/fabric-ca-client/node_modules/.bin:/usr/lib/node_modules/.bin:/sbin:/bin:/usr/sbin:/usr/bin 1670 verbose lifecycle x509@0.3.2~install: CWD: /usr/lib/node_modules/fabric-ca-client/node_modules/x509 1671 silly lifecycle x509@0.3.2~install: Args: [ '-c', 'node-gyp rebuild' ] 1672 silly lifecycle x509@0.3.2~install: Returned: code: 1 signal: null 1673 info lifecycle x509@0.3.2~install: Failed to exec install script 1674 verbose unlock done using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging 1675 verbose stack Error: x509@0.3.2 install: `node-gyp rebuild` 1675 verbose stack Exit status 1 1675 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:289:16) 1675 verbose stack at emitTwo (events.js:106:13) 1675 verbose stack at EventEmitter.emit (events.js:191:7) 1675 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14) 1675 verbose stack at emitTwo (events.js:106:13) 1675 verbose stack at ChildProcess.emit (events.js:191:7) 1675 verbose stack at maybeClose (internal/child_process.js:891:16) 1675 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 1676 verbose pkgid x509@0.3.2 1677 verbose cwd /home/ibmuser 1678 verbose Linux 3.10.0-514.el7.x86_64 1679 verbose argv "/usr/bin/node" "/bin/npm" "install" "-g" "fabric-ca-client@1.0.0" 1680 verbose node v6.11.0 1681 verbose npm v5.3.0 1682 error code ELIFECYCLE 1683 error errno 1 1684 error x509@0.3.2 install: `node-gyp rebuild` 1684 error Exit status 1 1685 error Failed at the x509@0.3.2 install script. 1685 error This is probably not a problem with npm. There is likely additional logging output above. 

任何帮助不胜感激。 提前致谢!