CentOS下安装python-mysqldb出现的问题(三)

2014-11-24 17:52:27 · 作者: · 浏览: 9
PyObject ?
_mysql.c: In function ? _mysql_ResultObject_setattr ? :
_mysql.c:2515: error: ? v ? undeclared (first use in this function)
_mysql.c:2516: error: ? PyExc_AttributeError ? undeclared (first use in this function)
_mysql.c: At top level:
_mysql.c:2534: error: expected ? = ? , ? , ? , ? ; ? , ? asm ? or ? __attribute__ ? before ? _mysql_ConnectionObject_Type ?
_mysql.c:2618: error: expected ? = ? , ? , ? , ? ; ? , ? asm ? or ? __attribute__ ? before ? _mysql_ResultObject_Type ?
_mysql.c:2704: error: expected ? = ? , ? , ? , ? ; ? , ? asm ? or ? __attribute__ ? before ? _mysql_methods ?
_mysql.c:2776: error: expected ? = ? , ? , ? , ? ; ? , ? asm ? or ? __attribute__ ? before ? * ? token
_mysql.c:2808: warning: return type defaults to ? int ?
_mysql.c: In function ? DL_EXPORT ? :
_mysql.c:2808: error: expected declaration specifiers before ? init_mysql ?
_mysql.c:2886: error: expected ? { ? at end of input
error: command 'gcc' failed with exit status 1


看的头都大了。


解决办法是:


yum install python-devel mysql-devel zlib-devel openssl-devel


然后再build、install