grpc: Failed to install grpc (version 1.0.1)

On both MacOS and Ubuntu 16 % npm install grpc

grpc@1.0.1 install /Users/jcastillo/dev/git/speech/src/node_modules/grpc node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.0.1/node-v51-darwin-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for grpc@1.0.1 and node@7.0.0 (node-v51 ABI) (falling back to source compile with node-gyp) ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ’ + name) ValueError: unsupported hash type md5 ERROR:root:code for hash sha1 was not found. Traceback (most recent call last): File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ’ + name) ValueError: unsupported hash type sha1 ERROR:root:code for hash sha224 was not found. Traceback (most recent call last): File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ’ + name) ValueError: unsupported hash type sha224 ERROR:root:code for hash sha256 was not found. Traceback (most recent call last): File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ’ + name) ValueError: unsupported hash type sha256 ERROR:root:code for hash sha384 was not found. Traceback (most recent call last): File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ’ + name) ValueError: unsupported hash type sha384 ERROR:root:code for hash sha512 was not found. Traceback (most recent call last): File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File “/usr/local/homebrew/Cellar/python/2.7.12_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py”, line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ’ + name) ValueError: unsupported hash type sha512 Traceback (most recent call last): File “/usr/local/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py”, line 16, in <module> sys.exit(gyp.script_main()) File “/usr/local/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py”, line 545, in script_main return main(sys.argv[1:]) File “/usr/local/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py”, line 538, in main return gyp_main(args) File “/usr/local/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py”, line 514, in gyp_main options.duplicate_basename_check) File “/usr/local/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py”, line 98, in Load generator.CalculateVariables(default_variables, params) File “/usr/local/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py”, line 77, in CalculateVariables import gyp.generator.xcode as xcode_generator File “/usr/local/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py”, line 7, in <module> import gyp.xcodeproj_file File “/usr/local/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py”, line 152, in <module> _new_sha1 = hashlib.sha1 AttributeError: ‘module’ object has no attribute ‘sha1’ gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Darwin 15.6.0 gyp ERR! command “/usr/local/homebrew/Cellar/node/7.0.0/bin/node” “/usr/local/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “configure” “–fallback-to-build” “–module=/Users/jcastillo/dev/git/speech/src/node_modules/grpc/src/node/extension_binary/grpc_node.node” “–module_name=grpc_node” “–module_path=/Users/jcastillo/dev/git/speech/src/node_modules/grpc/src/node/extension_binary” gyp ERR! cwd /Users/jcastillo/dev/git/speech/src/node_modules/grpc gyp ERR! node -v v7.0.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute ‘node-gyp configure --fallback-to-build --module=/Users/jcastillo/dev/git/speech/src/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/Users/jcastillo/dev/git/speech/src/node_modules/grpc/src/node/extension_binary’ (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/jcastillo/dev/git/speech/src/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:106:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) node-pre-gyp ERR! System Darwin 15.6.0 node-pre-gyp ERR! command “/usr/local/homebrew/Cellar/node/7.0.0/bin/node” “/Users/jcastillo/dev/git/speech/src/node_modules/grpc/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build” node-pre-gyp ERR! cwd /Users/jcastillo/dev/git/speech/src/node_modules/grpc node-pre-gyp ERR! node -v v7.0.0 node-pre-gyp ERR! node-pre-gyp -v v0.6.31 node-pre-gyp ERR! not ok Failed to execute ‘node-gyp configure --fallback-to-build --module=/Users/jcastillo/dev/git/speech/src/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/Users/jcastillo/dev/git/speech/src/node_modules/grpc/src/node/extension_binary’ (1) npm WARN speech@1.0.0 No description npm WARN speech@1.0.0 No repository field. npm ERR! Darwin 15.6.0 npm ERR! argv “/usr/local/homebrew/Cellar/node/7.0.0/bin/node” “/usr/local/homebrew/bin/npm” “install” “grpc” npm ERR! node v7.0.0 npm ERR! npm v3.10.8 npm ERR! code ELIFECYCLE

npm ERR! grpc@1.0.1 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the grpc@1.0.1 install script ‘node-pre-gyp install --fallback-to-build’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the grpc package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs grpc npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls grpc npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/jcastillo/dev/git/speech/src/npm-debug.log

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 3
  • Comments: 29 (8 by maintainers)

Most upvoted comments

The alternative, for now, is to use Node 6

When can we expect an update to support the current node version?

I am also getting the same error when try to install npm install firebase.

Please check this screen shot.

image

@camicase82 Thanks, I faced a similar problem. For me, the problem seemed to be my antivirus (Kaspersky). Once I disabled it, I was able to install firebase.

i solving this by run this command :

yarn add firebase

as alternative way installing this dependency

Any roadmap for v57 (8.x.x)?