簡體   English   中英

在Ubuntu 16.04中安裝npm install -g composer-cli時出現問題

[英]Problem in installing npm install -g composer-cli in ubuntu 16.04

嗨,我正在嘗試使用npm安裝composer-cli,但是它拋出錯誤。 錯誤日志如下:

18988 error code ELIFECYCLE
18989 error errno 1
18990 error grpc@1.10.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
18990 error Exit status 1
18991 error Failed at the grpc@1.10.1 install script.
18991 error This is probably not a problem with npm. There is likely additional logging output above.
18992 verbose exit [ 1, true ]

我嘗試了所有可能的方法來解決此問題。 但找不到任何解決方案。

請讓我知道如何解決此問題。

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.15.0-34-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/dspl_user/.npm-global/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/dspl_user/.npm-global/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc"
gyp ERR! cwd /home/dspl_user/.npm-global/lib/node_modules/composer-cli/node_modules/grpc
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.10.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the grpc@1.10.1 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!     /home/dspl_user/.npm/_logs/2018-09-27T13_11_13_477Z-debug.log

我想我和你有同樣的錯誤。 切換到Node 8.9.0后,它現在對我有用。 看來您正在使用Node v10,超分類帳結構不支持該節點。

我在Ubuntu 18.04計算機上通過=>解決了相同的問題

https://hyperledger.github.io/composer/latest/installing/installing-prereqs.html上安裝必備組件

上面說->

curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh

然后

chmod u+x prereqs-ubuntu.sh

最后=>

./prereqs-ubuntu.sh

然后重新啟動您的終端並嘗試安裝=>

npm install -g composer-cli@0.20

沒有su或sudo。 我希望這有幫助 :):)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM