1 |
eric@eric-virtual-machine:~$ pip install -r mysqlclient==1.3.12 |
1 2 3 4 5 6 7 8 9 10 |
/bin/sh: 1: mysql_config: not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-2zk1_tb0/mysqlclient/setup.py", line 16, in <module> metadata, options = get_config() File "/tmp/pip-install-2zk1_tb0/mysqlclient/setup_posix.py", line 51, in get_config libs = mysql_config("libs") File "/tmp/pip-install-2zk1_tb0/mysqlclient/setup_posix.py", line 29, in mysql_config raise EnvironmentError("%s not found" % (_mysql_config_path,)) OSError: mysql_config not found |
解决办法:
1 |
eric@eric-virtual-machine:~$ sudo apt-get install libmysqlclient-dev |
然后到mysql_config所在的目录(/usr/bin/mysql_config)
1 2 3 4 5 6 7 8 |
eric@eric-virtual-machine:~$ cd /usr/bin/ eric@eric-virtual-machine:/usr/bin$ sudo updatedb eric@eric-virtual-machine:/usr/bin$ cd eric@eric-virtual-machine:~$ locate mysql_config /usr/bin/mysql_config /usr/bin/mysql_config_editor /usr/share/man/man1/mysql_config.1.gz /usr/share/man/man1/mysql_config_editor.1.gz |
如果想赏钱,可以用微信扫描下面的二维码,一来能刺激我写博客的欲望,二来好维护云主机的费用; 另外再次标注博客原地址 itnotebooks.com 感谢!
