node-gyp-找不到哈希md5

我最近尝试使用Powerline字体安装Powerlevel9k及其字体。在此过程中,我尝试按照以下步骤操作以获取适当的python版本等...大致上,我认为我完全弄乱了整个本地python-openssl设置(可能尝试了一些让我运行的pip命令) 。现在我意识到我什至不能再在任何节点或角度项目上运行npm i。

我尝试了无所不在的尝试,并尝试了所有可以找到的修复方法,但似乎没有任何效果。我尝试卸载并重新安装python(最新版本,2.7和2.6),还尝试切换到使用pyenv并重新链接python,尝试使用homebrew卸载并重新安装openssl并指向bashrc并将编译器指向homebrew openssl,甚至尝试卸载nvm和节点并重新安装所有内容。

仍然没有运气。

> node-gyp rebuild

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.16/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/Cellar/python@2/2.7.16/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/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py",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/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py",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/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py",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/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py",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/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py",in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "/Users/joellyounrajendram/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py",line 16,in <module>
    sys.exit(gyp.script_main())
  File "/Users/joellyounrajendram/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py",line 545,in script_main
    return main(sys.argv[1:])
  File "/Users/joellyounrajendram/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py",line 538,in main
    return gyp_main(args)
  File "/Users/joellyounrajendram/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py",line 514,in gyp_main
    options.duplicate_basename_check)
  File "/Users/joellyounrajendram/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py",line 98,in Load
    generator.CalculateVariables(default_variables,params)
  File "/Users/joellyounrajendram/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py",line 79,in CalculateVariables
    import gyp.generator.xcode as xcode_generator
  File "/Users/joellyounrajendram/.nvm/versions/node/v12.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py",line 7,in <module>
    import gyp.xcodeproj_file
  File "/Users/joellyounrajendram/.nvm/versions/node/v12.6.0/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'
sh_jason_xu 回答:node-gyp-找不到哈希md5

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2669205.html

大家都在问