ubuntu mysql client_麻烦在ubuntu18.04上安装mysqlclient-问答-阿里云开发者社区-阿里云...

我正在尝试在ubuntu 18.04上为Django项目安装mysqlclient,但是在安装mysql时遇到问题。这是来自终端的信息:

pip install mysqlclient

Collecting mysqlclient

----------------------------------------

Failed building wheel for mysqlclient

Running setup.py clean for mysqlclient

2.7/MySQLdb/constants

running build_ext

building 'MySQLdb._mysql' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/MySQLdb

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -

Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-PPrPZj/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 -I/opt/lampp/include/mysql -I/opt/lampp/include/mysql/mysql -I/usr/include/python2.7 -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-2.7/MySQLdb/_mysql.o

MySQLdb/_mysql.c:29:10: fatal error: mysql.h: No such file or directory`enter code here`

#include "mysql.h"

^~~~~~~~~

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值