安装MySQL-python报错error: command 'gcc' failed with exit status 1

[root@vmoffice-7 MySQL-python-1.2.3]# python setup.py install

function)

....

_mysql.c:133: error: ‘ER_SYNTAX_ERROR’ undeclared (first use in this function)

_mysql.c:380: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’

_mysql.c:382: warning: implicit declaration of function ‘mysql_store_result’

_mysql.c:382: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’

_mysql.c:383: error: ‘_mysql_ResultObject’ has no member named ‘result’

_mysql.c: At top level:

_mysql.c:2331: error: ‘_mysql_ConnectionObject’ has no member named ‘open’

_mysql.c:2338: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’

_mysql.c:2345: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’

_mysql.c:2352: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’

_mysql.c:2359: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’

_mysql.c:2422: error: ‘_mysql_ResultObject’ has no member named ‘converter’

_mysql.c:2422: error: initializer element is not constant

_mysql.c:2422: error: (near initialization for ‘_mysql_ResultObject_memberlist[0].offset’)

_mysql.c: In function ‘_mysql_ConnectionObject_getattr’:

_mysql.c:2444: error: ‘_mysql_ConnectionObject’ has no member named ‘open’

error: command ‘gcc‘ failed with exit status 1

解决:

yum install mysql-devel -y


libxml2 libxml2-dev libxslt* zlib gcc openssl 

安装MySQL-python报错error: command 'gcc' failed with exit status 1,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。