美文网首页
安装mysqlclient报错

安装mysqlclient报错

作者: leejnull | 来源:发表于2020-02-24 16:04 被阅读0次

安装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用了两种解决方式,很奇怪为什么同一种方式不行,可能是系统版本不一样

  1. MacOS 10.14
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/ 

然后执行安装即可

pip3.8 install mysqlclient
  1. MacOS 10.15
LDFLAGS=-L/usr/local/opt/openssl/lib pip3.8 install mysqlclient

我的个人博客 https://leejnull.github.io/2020/02/24/2020-02-24-01/

相关文章

网友评论

      本文标题:安装mysqlclient报错

      本文链接:https://www.haomeiwen.com/subject/mrnvqhtx.html