安装mysqlclient,报错,一般问题卡在这里
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'gcc' failed with exit status 1
首先确保安装了openssl
brew install openssl
我两台mac用了两种解决方式,很奇怪为什么同一种方式不行,可能是系统版本不一样
- MacOS 10.14
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
然后执行安装即可
pip3.8 install mysqlclient
- MacOS 10.15
LDFLAGS=-L/usr/local/opt/openssl/lib pip3.8 install mysqlclient
网友评论