运行fabric过程中,node无法下载grpc错误

在学习fabric过程中,按照官方文档中,有一步Install the clients & launch the network

这一步要在fabcar下面执行npm install

执行后会报如下错误

[root@localhost fabcar]# npm install

> [email protected] install /opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-linux-x64-glibc.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file 
make: 进入目录“/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/build”
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
make: 进入目录“/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/build”
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
rm: 无法删除"./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw": 没有那个文件或目录
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] 错误 1
make: 离开目录“/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/build”
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:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 3.10.0-862.3.2.el7.x86_64
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=/opt/soft/fabric/scripts/fabric-samples/fabcar/node
_modules/fabric-client/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc"gyp ERR! cwd /opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc
gyp ERR! node -v v10.7.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/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=/opt/soft/fabric/scripts/fabr
ic-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc' (1)node-pre-gyp ERR! stack     at ChildProcess. (/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Linux 3.10.0-862.3.2.el7.x86_64
node-pre-gyp ERR! command "/usr/local/bin/node" "/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_librar
y"node-pre-gyp ERR! cwd /opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc
node-pre-gyp ERR! node -v v10.7.0
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok 
Failed to execute '/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=/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/
fabric-client/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc' (1)Assembler messages:] | install: info lifecycle [email protected]~install: Failed to exec install script
错误:can't open /opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/ccL5yHpN.s for reading: 没有那个文件或目录
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o] 错误 1
make: 离开目录“/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/build”
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:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 3.10.0-862.3.2.el7.x86_64
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=/opt/soft/fabric/scripts/fabric-samples/fabcar/node
_modules/fabric-client/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc"gyp ERR! cwd /opt/soft/fabric/scripts/fabric-samples/fabcar/node_modules/fabric-client/node_modules/grpc
gyp ERR! node -v v10.7.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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/2018-08-01T06_21_22_930Z-debug.log

刚开始以为网络问题,可能挂了代理也下不来

后来在https://github.com/grpc/grpc/issues/8570这个文章里看到需要执行

 

npm install --save @google-cloud/vision

就可以了

你可能感兴趣的:(运行fabric过程中,node无法下载grpc错误)