2010-06-09 125 views
1

所以我一直拉着我的頭髮試圖安裝mysqldb軟件包。 當我運行構建我得到錯誤的長成績單,繼承人只是其中的一部分,我會斷定這一切,但其巨大的錯誤Python:mysqldb安裝錯誤

[[email protected] MySQL-python-1.2.3c1]$ sudo python setup.py build 
[sudo] password for rv: 
running build 
running build_py 
copying MySQLdb/release.py -> build/lib.linux-i686-2.6/MySQLdb 
running build_ext 
building '_mysql' extension 
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -Dversion_info=(1,2,3,'gamma',1) -D__version__=1.2.3c1 -I/usr/include/mysql -I/usr/include/python2.6 -c _mysql.c -o build/temp.linux-i686-2.6/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -DUNIV_LINUX 
_mysql.c:36:23: error: my_config.h: No such file or directory 
_mysql.c:38:19: error: mysql.h: No such file or directory 

任何想法的名單?

+0

你使用的是什麼操作系統? – 2010-06-09 23:47:18

+0

我正在使用Fedora操作系統 – Grenko 2010-06-09 23:49:30

+0

您不應該通過sudo運行構建,只能安裝。 – 2010-06-09 23:57:26

回答

4
yum install mysql-devel