macOS上的回购同步错误_ssl.so找不到图像

2024-04-26 06:08:25 发布

您现在位置:Python中文网/ 问答频道 /正文

在从mirro.tuna下载tar文件后,我已经初始化了AOSP repo,但是在执行repo sync时遇到了以下错误。在

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.15_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/Cellar/python@2/2.7.15_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 "/Volumes/Android/Source/aosp/.repo/repo/main.py", line 50, in <module>
    from git_config import init_ssh, close_ssh
  File "/Volumes/Android/Source/aosp/.repo/repo/git_config.py", line 24, in <module>
    import ssl
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: dlopen(/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so
  Reason: image not found

Tags: inpyssllibusrlocallinerepo
2条回答

@Jeremy的解决方案也解决了我在python3上的问题。无法直接评论,请在此处单独回答。快跑

brew reinstall python@3

查看日志,在执行import ssl时会发生错误。我发现libssl.1.0.0.dylib丢失。这可能是由于我对brew install python@2的部分更新或其他未知的损坏。我通过自制程序重新安装了python@2,错误消失了。在

brew reinstall python@2

相关问题 更多 >

    热门问题