mysqldb mysql_config
在安裝mysqldb Python的時候會用到mysql_config,但是正常安裝的MySQL環境下是沒有這個文件的,這個文件在Linux下是可執行文件,所以需要到mysql官方網站上下載MySQL-devel-5.1.50-1.glibc23.i386.rpm,然后用whereis mysql_config命令即可找到mysql_config文件啦
mysql_config在/usr/lib/mysql和/usr/bin下。
找不到mysql_config一般是由于通過lnmp.org或者其他方式安裝mysql以后mysql_config是在/usr/local/mysql/bin/里面,這里面的文件不是在任意位置都可以訪問的
解決方法:
執行
ln -s /usr/local/mysql/bin/mysql_config /usr/local/bin/mysql_config
將mysql_config鏈接到/usr/local/bin目錄下
https://dev.mysql.com/doc/refman/5.7/en/mysql-config.html
mysql_config provides you with useful information for compiling your MySQL client and connecting it to MySQL. It is a shell script, so it is available only on Unix and Unix-like systems.
-
C Compiler flags to find include files and critical compiler flags and defines used when compiling the
libmysqlclientlibrary. The options returned are tied to the specific compiler that was used when the library was created and might clash with the settings for your own compiler. Use--includefor more portable options that contain only include paths. -
Like
--cflags, but for C++ compiler flags. -
Compiler options to find MySQL include files.
-
Libraries and options required to link with the MySQL client library.
總結
以上是生活随笔為你收集整理的mysqldb mysql_config的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C#基础学习5
- 下一篇: Java中都通用文件下载(Content