Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 错误:命令';gcc&x27;失败,退出状态为1-centos_Python_Python 2.7_Gcc_Python 3.x_Mysql Python - Fatal编程技术网

Python 错误:命令';gcc&x27;失败,退出状态为1-centos

Python 错误:命令';gcc&x27;失败,退出状态为1-centos,python,python-2.7,gcc,python-3.x,mysql-python,Python,Python 2.7,Gcc,Python 3.x,Mysql Python,我正在尝试安装Mysql python connector for Mysql。我面临以下错误“错误:命令“gcc”失败,退出状态为1” 我试着安装了 1.gcc使用yum安装gcc 2.python-devel和mysql-devel使用yum安装python-devel-mysql-devel 什么也解决不了我的问题 请查看我的回溯: [root@localhost MySQL-python-1.2.4b4]# python setup.py install running install

我正在尝试安装Mysql python connector for Mysql。我面临以下错误“
错误:命令“gcc”失败,退出状态为1

我试着安装了 1.gcc使用
yum安装gcc
2.python-devel和mysql-devel使用
yum安装python-devel-mysql-devel

什么也解决不了我的问题

请查看我的回溯:

[root@localhost MySQL-python-1.2.4b4]# python setup.py install
running install
running bdist_egg
running egg_info
writing MySQL_python.egg-info/PKG-INFO
writing top-level names to MySQL_python.egg-info/top_level.txt
writing dependency_links to MySQL_python.egg-info/dependency_links.txt
reading manifest file 'MySQL_python.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MySQL_python.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
copying MySQLdb/release.py -> build/lib.linux-i686-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,4,'beta',4) -D__version__=1.2.4b4 -I/usr/include/mysql -I/usr/local/include/python2.7 -c _mysql.c -o build/temp.linux-i686-2.7/_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
_mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
_mysql.c:602: error: expected expression before ‘)’ token

error: command 'gcc' failed with exit status 1

需要帮助。

此问题似乎与主题无关,因为它涉及的是一个损坏的包。这似乎是一个编译错误。将其报告给Mysql python连接器维护人员。这似乎是一个错误。下载一个不是1.2.4的版本。@svk如果我使用MySQL-python-1.2.3或MySQL-python-1.2.2,这个问题不会出现,我可以正确安装它。