安装mysql-python时出错:找不到用于-lssl的库 [英] Error installing mysql-python: library not found for -lssl

查看:130
本文介绍了安装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:

  • libressl
  • 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!

推荐答案

通过以下步骤解决了该问题:

Solved it with these steps:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆