centos 7 安装mysqlclient报错mysql_config not found
程序员文章站
2022-05-29 11:06:28
...
具体报错如下:
[[email protected] ~]# pip install mysqlclient
Collecting mysqlclient
Downloading http://pypi.doubanio.com/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.12.tar.gz (89kB)
100% |████████████████████████████████| 92kB 3.8MB/s
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-mPr2_0/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
解决方法,先安装mysql-devel,再安装mysqlclient
yum install mysql-devel
pip install mysqlclient
推荐阅读
-
CentOS 7 离线环境安装nginx时报错:./configure: error: C compiler cc is not found
-
CentOS7安装mysql后无法启动服务,提示Unit not found
-
centos7安装deno时,出现version `GLIBC_2.18' not found
-
安装pip install mysqlclient 解决mysql_config:command not found
-
pip install mysqlclient 报错 OSError: mysql_config not found
-
在centOs7虚拟机上安装vmware-tools时的报错解决 centos虚拟机vmware
-
在centOs7虚拟机上安装vmware-tools时的报错解决 centos虚拟机vmware
-
安装mysqlclient报OSError: mysql_config not found
-
centos7最小化安装中使用yum命令报错:14: curl#6 - “Could not resolve host: mirrorlist.centos.org; 未知的错误“
-
Mac 安装mysqlclient报错,OSError: mysql_config not found 的解决方法