简体   繁体   English

安装Hyperledger Hurley时出现npm错误

[英]npm error when Installing hyperledger Hurley

Trying to install Hyperledger Hurley on ubuntu 18.04 using this command : sudo npm install -g @worldsibu/hurley --unsafe-perm=true 尝试使用以下命令在ubuntu 18.04上安装Hyperledger Hurley:sudo npm install -g @ worldsibu / hurley --unsafe-perm = true

New ubuntu 18.04 vm with nothing related Hyperledger installed on it. 新的ubuntu 18.04 vm上未安装任何相关的Hyperledger。 (Is it the issue ??) (是这个问题吗?)

I get the following error msg : 我收到以下错误消息:

gyp ERR! 糟糕! build error gyp ERR! 生成错误gyp ERR! stack Error: not found: make gyp ERR! 堆栈错误:找不到:使gyp错误! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12) gyp ERR! 堆栈在getNotFoundError(/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19) gyp ERR! 堆栈在F(/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29) gyp ERR! 堆栈在E(/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16 gyp ERR! 堆栈在/usr/lib/node_modules/npm/node_modules/that/which.js:89:16 gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5 gyp ERR! 堆栈在/usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5 gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5 堆栈在/usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5

Error from th npm log file : 来自npm日志文件的错误:

18744 verbose stack Error: @ampretia/x509@0.4.0 install: `node-gyp rebuild 18744 verbose stack Exit status 1 18744 verbose stack 18744详细堆栈错误:@ ampretia / x509 @ 0.4.0安装:`node-gyp重建18744详细堆栈退出状态1 18744详细堆栈
at EventEmitter. 在EventEmitter。 (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:326:16) 18744 verbose stack at EventEmitter.emit (events.js:209:13) node-gyp rebuild (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:326:16)18744 EventEmitter.emit(events.js:209:13)上的详细堆栈node-gyp重建

Did anybody saw something like that already ? 有人看到过类似的东西吗?

Thanks in advance for any help. 在此先感谢您的帮助。

Problem fixed. 问题已解决。 Replace nodejs v12 by nodejs v8.x 用nodejs v8.x替换nodejs v12

Configure npm to run without sudo rights with : 使用以下命令将npm配置为在没有sudo权限的情况下运行:

$ npm config set prefix "~/.npm-global"

$ nano .profile
...
# NPM
 export PATH=~/.npm-global/bin:$PATH
$ source .profile

and than you can install hurley succesfully with: 然后您可以使用以下方法成功安装hurley:

npm install -g @worldsibu/hurley 

without sudo and without "--unsafe-perm=true" 没有sudo且没有“ --unsafe-perm = true”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM