узел-гип - ха sh md5 не найден - PullRequest
3 голосов
/ 10 марта 2020

Недавно я пытался установить Powerlevel9k и его шрифты, используя шрифты Powerline. Во время процесса я пытался выполнить шаги, чтобы получить соответствующую python версию и c ... В каком-то смысле, я думаю, что я полностью испортил весь свой локальный python - openssl настроен (возможно, пробовал какой-то пункт Команда они заставили меня бежать). Теперь я понял, что больше не могу даже запускать npm i на любом из моих узлов или angular проектов.

Я пробовал искать везде и пробовал все найденные исправления, но, похоже, ничего не работает. Я попытался удалить и переустановить python (последняя версия, 2.7 и 2.6), также попытался переключиться на использование pyenv и перекомпоновать python, попытался удалить и переустановить openssl с помощью homebrew и указать bashr c и указать компиляторам на 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", 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 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", 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 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", 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 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", 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 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", 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 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'
...