繁体   English   中英

无法在ubuntu中使用pip3为django安装mysqlclient

[英]unable to install mysqlclient for django using pip3 in ubuntu

命令: sudo -H pip3 install mysqlclient

错误:

/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-b0rfercj
/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-lck3vdnw-record
/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in 
/tmp/pip-build-b0rfercj/mysqlclient/

我已经安装了 python3-dev

python3-dev is already the newest version (3.6.7-1~18.04).

你安装了libssllibcrypto吗?

sudo apt-get install libssl-dev
sudo apt-get install libssl-dev

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM