配置MySQL-Python的时候系统报错,提示:
EnvironmentError: mysql_config not found
Google后得知mysql_config是属于MySQL开发用的文件,而使用apt-get安装的MySQL是没有这个文件的,于是在包安装器里面寻找
libmysqld-dev
libmysqlclient-dev
这两个包安装后问题即可解决
使用apt-cache search命令查询这两个相关包的命令:
jgcai@David:/etc/apt/sources.list.d$ sudo apt-cache search libmysqlclient-dev
[sudo] jgcai 的密码:
libmysqlclient-dev - MySQL database development files
libglpk36 - linear programming kit with integer (MIP) support
libmariadbclient-dev - MariaDB database development files
jgcai@David:/etc/apt/sources.list.d$ sudo apt-cache search libmysqld-dev
libmysqld-dev - MySQL embedded database development files
libmariadbd-dev - MariaDB embedded database development files