安装 mysql-python 时出错:找不到 -lssl 的库 [英] Error installing mysql-python: library not found for -lssl
本文介绍了安装 mysql-python 时出错:找不到 -lssl 的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在安装 mysql-python 时遇到问题.创建了一个新的 virtualenv 并在安装 mysql-python 时...这是错误消息:
I'm having trouble installing mysql-python. Created a new virtualenv and when installing mysql-python... here's the error message:
(env)$ pip install mysql-python
Collecting mysql-python
...
clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk build/temp.macosx-10.12-x86_64-2.7/_mysql.o -L/usr /local/Cellar/mysql/5.7.16/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.12-x86_64-2.7/_mysql.so
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
使用自制软件,我已经安装:
Using homebrew, I have installed:
- 图书馆
- openssl
- openssl@1.1
- mysql
已经尝试brew link
但brew拒绝这样做.
Already tried to brew link
but brew refuses to do so.
操作系统是 MacOS Sierra.
The OS is MacOS Sierra.
有人可以帮忙吗?谢谢!
Can anyone help? Thanks!
推荐答案
通过以下步骤解决:
brew uninstall mysql
brew install mysql-connector-c
pip install mysql-python
brew unlink mysql-connector-c
brew install mysql
在这里找到答案https://stackoverflow.com/a/25920020/576192
不确定这是否是正确的方法,但这是我设法解决的方法.
Not sure if this is the right way, but this is how I managed to solve it.
这篇关于安装 mysql-python 时出错:找不到 -lssl 的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文