Reputation: 106
I've got my AOSP repo initialized after downloading a tar file from mirro.tuna, but I met the following error when I executed 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
Upvotes: 0
Views: 2157
Reputation: 7411
I guess it depends on what python
symlink to version, so it is better to reinstall python
brew reinstall python
Upvotes: 0
Reputation: 56
@Jeremy's solution fixed my problem on Python 3 as well. Cannot comment directly so put a separate answer here. Just run
brew reinstall python@3
Upvotes: 0
Reputation: 106
Looking at the log, the error occurs when import ssl
is executed. I found libssl.1.0.0.dylib is missing. It could be due to my partial update on brew install python@2
or some other unknown broken. I reinstalled the python@2
through Homebrew and the error disappears.
brew reinstall python@2
Upvotes: 1