我的Linux 联合人才网 校友噜噜 免费代理IP 每天更新 华数IDC 上海网站制作 达人社 爱蜂窝 开源社区 ben&tina's blog ThinkSAAS wdcdn联盟 域名抢注 免费智能DNS SEO论坛 智博网络
wdlinux默认的python版本是2.4,安装MySQLDb时出错,求帮助.谢谢
是什么错误
[root@localhost MySQL-python-1.2.3]# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-i686-2.4/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=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/www/wdlinux/mysql/include/mysql -I/usr/include/python2.4 -c _mysql.c -o build/temp.linux-i686-2.4/_mysql.o -g -DUNIV_LINUX -DUNIV_LINUX
In file included from _mysql.c:29:
pymemcompat.h:10:20: error: Python.h: No such file or directory
_mysql.c:30:26: error: structmember.h: No such file or directory
_mysql.c:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:63: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:65: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:67: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:71: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:75: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
_mysql.c:85: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_Type’
_mysql.c:88: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
_mysql.c:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_Type’
_mysql.c:105: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:227: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:318: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:336: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:359: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:360: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: In function ‘_mysql_ResultObject_Initialize’:
_mysql.c:362: error: ‘NULL’ undeclared (first use in this function)
_mysql.c:362: error: (Each undeclared identifier is reported only once
_mysql.c:362: error: for each function it appears in.)
_mysql.c:364: warning: initialization from incompatible pointer type
_mysql.c:366: error: ‘PyObject’ undeclared (first use in this function)
_mysql.c:366: error: ‘conv’ undeclared (first use in this function)
_mysql.c:366: error: invalid operands to binary *
_mysql.c:366: warning: statement with no effect
_mysql.c:370: warning: implicit declaration of function ‘PyArg_ParseTupleAndKeywords’
_mysql.c:370: error: ‘args’ undeclared (first use in this function)
_mysql.c:370: error: ‘kwargs’ undeclared (first use in this function)
_mysql.c:373: warning: implicit declaration of function ‘PyDict_New’
_mysql.c:373: warning: statement with no effect
_mysql.c:375: error: ‘_mysql_ResultObject’ has no member named ‘conn’
_mysql.c:375: error: expected expression before ‘)’ token
_mysql.c:375: error: invalid operands to binary *
_mysql.c:375: warning: statement with no effect
_mysql.c:376: warning: implicit declaration of function ‘Py_INCREF’
_mysql.c:377: error: ‘_mysql_ResultObject’ has no member named ‘use’
_mysql.c:377: warning: statement with no effect
_mysql.c:378: error: ‘Py_BEGIN_ALLOW_THREADS’ undeclared (first use in this function)
_mysql.c:378: warning: statement with no effect
_mysql.c:380: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:380: warning: passing argument 1 of ‘mysql_use_result’ from incompatible pointer type
_mysql.c:382: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:382: warning: passing argument 1 of ‘mysql_store_result’ from incompatible pointer type
_mysql.c:383: error: ‘_mysql_ResultObject’ has no member named ‘result’
_mysql.c:383: warning: statement with no effect
_mysql.c:384: error: ‘Py_END_ALLOW_THREADS’ undeclared (first use in this function)
缺少了些文件或库吧
是什么错误
是什么错误
错误信息
[root@localhost MySQL-python-1.2.3]# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-i686-2.4/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=i386 -mtune=generic -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/www/wdlinux/mysql/include/mysql -I/usr/include/python2.4 -c _mysql.c -o build/temp.linux-i686-2.4/_mysql.o -g -DUNIV_LINUX -DUNIV_LINUX
In file included from _mysql.c:29:
pymemcompat.h:10:20: error: Python.h: No such file or directory
_mysql.c:30:26: error: structmember.h: No such file or directory
_mysql.c:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:63: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:64: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:65: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:67: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:69: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:71: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:72: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:75: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
_mysql.c:85: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_Type’
_mysql.c:88: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
_mysql.c:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_Type’
_mysql.c:105: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:227: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:318: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:336: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:359: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:360: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: In function ‘_mysql_ResultObject_Initialize’:
_mysql.c:362: error: ‘NULL’ undeclared (first use in this function)
_mysql.c:362: error: (Each undeclared identifier is reported only once
_mysql.c:362: error: for each function it appears in.)
_mysql.c:364: warning: initialization from incompatible pointer type
_mysql.c:366: error: ‘PyObject’ undeclared (first use in this function)
_mysql.c:366: error: ‘conv’ undeclared (first use in this function)
_mysql.c:366: error: invalid operands to binary *
_mysql.c:366: warning: statement with no effect
_mysql.c:370: warning: implicit declaration of function ‘PyArg_ParseTupleAndKeywords’
_mysql.c:370: error: ‘args’ undeclared (first use in this function)
_mysql.c:370: error: ‘kwargs’ undeclared (first use in this function)
_mysql.c:373: warning: implicit declaration of function ‘PyDict_New’
_mysql.c:373: warning: statement with no effect
_mysql.c:375: error: ‘_mysql_ResultObject’ has no member named ‘conn’
_mysql.c:375: error: expected expression before ‘)’ token
_mysql.c:375: error: invalid operands to binary *
_mysql.c:375: warning: statement with no effect
_mysql.c:376: warning: implicit declaration of function ‘Py_INCREF’
_mysql.c:377: error: ‘_mysql_ResultObject’ has no member named ‘use’
_mysql.c:377: warning: statement with no effect
_mysql.c:378: error: ‘Py_BEGIN_ALLOW_THREADS’ undeclared (first use in this function)
_mysql.c:378: warning: statement with no effect
_mysql.c:380: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:380: warning: passing argument 1 of ‘mysql_use_result’ from incompatible pointer type
_mysql.c:382: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:382: warning: passing argument 1 of ‘mysql_store_result’ from incompatible pointer type
_mysql.c:383: error: ‘_mysql_ResultObject’ has no member named ‘result’
_mysql.c:383: warning: statement with no effect
_mysql.c:384: error: ‘Py_END_ALLOW_THREADS’ undeclared (first use in this function)
缺少了些文件或库吧
缺少了些文件或库吧