Centos6.5 x64 系统python2.6.6安装MySQL-python模块

一、安装前准备
操作系统:centos6.5 x64
·安装python和python开发工具
   python python-devel
·安装mysql-server和mysql开发工具
   mysql-server mysql mysql-devel
yum -y install mysql-devel libxml2 libxml2-dev libxslt* zlib gcc openssl

1.下载安装setuptools
  wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c8.tar.gz
[root@localhost opt]#wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c8.tar.gz
[root@localhost opt]#tar xzf setuptools-0.6c8.tar.gz
[root@localhost setuptools-0.6c8]# python setup.py build
[root@localhost setuptools-0.6c8]# python setup.py install
2.下载安装MySQL-python
[root@localhost opt]# wget http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz/download
[root@localhost opt]# cd MySQL-python-1.2.3/
[root@localhost MySQL-python-1.2.3]$ sudo python setup.py build
[root@localhost MySQL-python-1.2.3]$ sudo python setup.py install

以上即可安装成功

二、安装过程中遇到的错误
查找了原因是因为没有安装mysql和python开发环境。
解决方法: sudo yum install python-devel mysql-devel
然后在安装一次即可成功
[root@localhost MySQL-python-1.2.3]# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.6/MySQLdb
running build_ext
building '_mysql' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/include/mysql -I/usr/include/python2.6 -c _mysql.c -o build/temp.linux-x86_64-2.6/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -DUNIV_LINUX -DUNIV_LINUX
在包含自 _mysql.c:29 的文件中:
pymemcompat.h:10:20: 错误:Python.h:没有那个文件或目录
_mysql.c:30:26: 错误:structmember.h:没有那个文件或目录
_mysql.c:62: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:63: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:64: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:65: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:66: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:67: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:68: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:69: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:70: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:71: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:72: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:75: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
_mysql.c:85: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_Type’
_mysql.c:88: 错误:expected specifier-qualifier-list before ‘PyObject_HEAD’
_mysql.c:96: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_Type’
_mysql.c:105: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:227: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:318: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:336: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:359: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:360: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: 在函数‘_mysql_ResultObject_Initialize’中:
_mysql.c:362: 错误:‘NULL’未声明(在此函数内第一次使用)
_mysql.c:362: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
_mysql.c:362: 错误:所在的函数内也只报告一次。)
_mysql.c:364: 警告:从不兼容的指针类型初始化
_mysql.c:366: 错误:‘PyObject’未声明(在此函数内第一次使用)
_mysql.c:366: 错误:‘conv’未声明(在此函数内第一次使用)
_mysql.c:366: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:366: 警告:语句不起作用
_mysql.c:370: 警告:隐式声明函数‘PyArg_ParseTupleAndKeywords’
_mysql.c:370: 错误:‘args’未声明(在此函数内第一次使用)
_mysql.c:370: 错误:‘kwargs’未声明(在此函数内第一次使用)
_mysql.c:373: 警告:隐式声明函数‘PyDict_New’
_mysql.c:373: 警告:语句不起作用
_mysql.c:375: 错误:‘_mysql_ResultObject’没有名为‘conn’的成员
_mysql.c:375: 错误:expected expression before ‘)’ token
_mysql.c:375: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:375: 警告:语句不起作用
_mysql.c:376: 警告:隐式声明函数‘Py_INCREF’
_mysql.c:377: 错误:‘_mysql_ResultObject’没有名为‘use’的成员
_mysql.c:377: 警告:语句不起作用
_mysql.c:378: 错误:‘Py_BEGIN_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:378: 警告:语句不起作用
_mysql.c:380: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:380: 警告:传递‘mysql_use_result’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:458: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:382: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:382: 警告:传递‘mysql_store_result’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:457: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:383: 错误:‘_mysql_ResultObject’没有名为‘result’的成员
_mysql.c:383: 警告:语句不起作用
_mysql.c:384: 错误:‘Py_END_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:384: 警告:语句不起作用
_mysql.c:386: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员
_mysql.c:386: 警告:隐式声明函数‘PyTuple_New’
_mysql.c:386: 警告:语句不起作用
_mysql.c:390: 错误:‘_mysql_ResultObject’没有名为‘nfields’的成员
_mysql.c:390: 警告:语句不起作用
_mysql.c:391: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员
_mysql.c:394: 错误:‘tmp’未声明(在此函数内第一次使用)
_mysql.c:394: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:394: 错误:‘fun’未声明(在此函数内第一次使用)
_mysql.c:394: 警告:逗号表达式的左操作数不起作用
_mysql.c:394: 警告:语句不起作用
_mysql.c:395: 警告:隐式声明函数‘PyInt_FromLong’
_mysql.c:395: 警告:语句不起作用
_mysql.c:397: 警告:隐式声明函数‘PyObject_GetItem’
_mysql.c:397: 警告:语句不起作用
_mysql.c:398: 警告:隐式声明函数‘Py_DECREF’
_mysql.c:400: 警告:隐式声明函数‘PyErr_Clear’
_mysql.c:401: 错误:‘Py_None’未声明(在此函数内第一次使用)
_mysql.c:401: 警告:语句不起作用
_mysql.c:404: 警告:隐式声明函数‘PySequence_Check’
_mysql.c:405: 警告:隐式声明函数‘PySequence_Size’
_mysql.c:406: 错误:‘fun2’未声明(在此函数内第一次使用)
_mysql.c:406: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:406: 警告:语句不起作用
_mysql.c:408: 错误:‘t’未声明(在此函数内第一次使用)
_mysql.c:408: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:408: 警告:隐式声明函数‘PySequence_GetItem’
_mysql.c:408: 警告:语句不起作用
_mysql.c:410: 警告:隐式声明函数‘PyTuple_Check’
_mysql.c:411: 警告:隐式声明函数‘PyTuple_GET_SIZE’
_mysql.c:413: 错误:‘pmask’未声明(在此函数内第一次使用)
_mysql.c:413: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:413: 警告:语句不起作用
_mysql.c:414: 警告:隐式声明函数‘PyTuple_GET_ITEM’
_mysql.c:414: 警告:语句不起作用
_mysql.c:415: 警告:语句不起作用
_mysql.c:416: 警告:隐式声明函数‘PyInt_Check’
_mysql.c:417: 警告:隐式声明函数‘PyInt_AS_LONG’
_mysql.c:433: 警告:语句不起作用
_mysql.c:436: 警告:语句不起作用
_mysql.c:438: 警告:隐式声明函数‘PyTuple_SET_ITEM’
_mysql.c:438: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员
_mysql.c: 在函数‘_mysql_ResultObject_clear’中:
_mysql.c:462: 警告:隐式声明函数‘Py_XDECREF’
_mysql.c:462: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员
_mysql.c:463: 错误:‘_mysql_ResultObject’没有名为‘converter’的成员
_mysql.c:463: 错误:‘NULL’未声明(在此函数内第一次使用)
_mysql.c:463: 警告:语句不起作用
_mysql.c:464: 错误:‘_mysql_ResultObject’没有名为‘conn’的成员
_mysql.c:465: 错误:‘_mysql_ResultObject’没有名为‘conn’的成员
_mysql.c:465: 警告:语句不起作用
_mysql.c: 在文件层:
_mysql.c:472: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:473: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: 在函数‘_mysql_ConnectionObject_Initialize’中:
_mysql.c:475: 错误:‘NULL’未声明(在此函数内第一次使用)
_mysql.c:475: 警告:从不兼容的指针类型初始化
_mysql.c:476: 错误:‘PyObject’未声明(在此函数内第一次使用)
_mysql.c:476: 错误:‘conv’未声明(在此函数内第一次使用)
_mysql.c:476: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:476: 警告:语句不起作用
_mysql.c:477: 错误:‘ssl’未声明(在此函数内第一次使用)
_mysql.c:477: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:477: 警告:语句不起作用
_mysql.c:479: 警告:从不兼容的指针类型初始化
_mysql.c:479: 警告:从不兼容的指针类型初始化
_mysql.c:479: 警告:从不兼容的指针类型初始化
_mysql.c:480: 警告:从不兼容的指针类型初始化
_mysql.c:480: 警告:从不兼容的指针类型初始化
_mysql.c:482: 警告:从不兼容的指针类型初始化
_mysql.c:482: 警告:从不兼容的指针类型初始化
_mysql.c:482: 警告:从不兼容的指针类型初始化
_mysql.c:483: 警告:从不兼容的指针类型初始化
_mysql.c:483: 警告:从不兼容的指针类型初始化
_mysql.c:493: 错误:初始值设定元素不是常量
_mysql.c:493: 错误:(在‘kwlist[16]’的初始化附近)
_mysql.c:496: 警告:从不兼容的指针类型初始化
_mysql.c:497: 警告:从不兼容的指针类型初始化
_mysql.c:498: 警告:从不兼容的指针类型初始化
_mysql.c:500: 错误:‘_mysql_ConnectionObject’没有名为‘converter’的成员
_mysql.c:500: 警告:语句不起作用
_mysql.c:501: 错误:‘_mysql_ConnectionObject’没有名为‘open’的成员
_mysql.c:501: 警告:语句不起作用
_mysql.c:502: 警告:隐式声明函数‘_mysql_Exception’
_mysql.c:503: 错误:‘args’未声明(在此函数内第一次使用)
_mysql.c:503: 错误:‘kwargs’未声明(在此函数内第一次使用)
_mysql.c:523: 错误:‘value’未声明(在此函数内第一次使用)
_mysql.c:523: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:523: 警告:语句不起作用
_mysql.c:524: 警告:隐式声明函数‘PyMapping_GetItemString’
_mysql.c:524: 警告:语句不起作用
_mysql.c:524: 警告:隐式声明函数‘PyString_AsString’
_mysql.c:524: 警告:赋值时将整数赋给指针,未作类型转换
_mysql.c:525: 警告:语句不起作用
_mysql.c:525: 警告:赋值时将整数赋给指针,未作类型转换
_mysql.c:526: 警告:语句不起作用
_mysql.c:526: 警告:赋值时将整数赋给指针,未作类型转换
_mysql.c:527: 警告:语句不起作用
_mysql.c:527: 警告:赋值时将整数赋给指针,未作类型转换
_mysql.c:528: 警告:语句不起作用
_mysql.c:528: 警告:赋值时将整数赋给指针,未作类型转换
_mysql.c:536: 错误:‘Py_BEGIN_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:536: 警告:语句不起作用
_mysql.c:537: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:537: 警告:传递‘mysql_init’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:437: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:540: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:541: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:544: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:544: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:548: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:548: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:549: 警告:比较不相关的指针时缺少类型转换
_mysql.c:550: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:550: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:551: 警告:比较不相关的指针时缺少类型转换
_mysql.c:552: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:552: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:553: 警告:比较不相关的指针时缺少类型转换
_mysql.c:554: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:554: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:557: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:557: 警告:传递‘mysql_options’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:543: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:561: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:562: 警告:传递‘mysql_ssl_set’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:438: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:565: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:566: 警告:传递‘mysql_real_connect’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:444: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:568: 错误:‘Py_END_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:568: 警告:语句不起作用
_mysql.c:577: 警告:语句不起作用
_mysql.c:583: 错误:‘_mysql_ConnectionObject’没有名为‘converter’的成员
_mysql.c:583: 警告:语句不起作用
_mysql.c:591: 错误:‘_mysql_ConnectionObject’没有名为‘open’的成员
_mysql.c:591: 警告:语句不起作用
_mysql.c: 在文件层:
_mysql.c:649: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c: 在函数‘_mysql_ConnectionObject_clear’中:
_mysql.c:681: 错误:‘_mysql_ConnectionObject’没有名为‘converter’的成员
_mysql.c:682: 错误:‘_mysql_ConnectionObject’没有名为‘converter’的成员
_mysql.c:682: 错误:‘NULL’未声明(在此函数内第一次使用)
_mysql.c:682: 警告:语句不起作用
_mysql.c: 在文件层:
_mysql.c:689: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:717: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:733: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:751: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:770: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:796: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:818: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:850: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:876: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:903: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:918: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:935: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:951: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:969: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1004: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1035: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1037: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1067: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1097: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1131: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1163: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1199: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1223: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1248: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1273: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1312: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1351: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1356: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:1359: 错误:expected declaration specifiers or ‘...’ before ‘_PYFUNC’
_mysql.c: 在函数‘_mysql__fetch_row’中:
_mysql.c:1365: 错误:‘PyObject’未声明(在此函数内第一次使用)
_mysql.c:1365: 错误:‘v’未声明(在此函数内第一次使用)
_mysql.c:1365: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:1365: 警告:语句不起作用
_mysql.c:1366: 错误:‘_mysql_ResultObject’没有名为‘use’的成员
_mysql.c:1367: 错误:‘_mysql_ResultObject’没有名为‘result’的成员
_mysql.c:1367: 警告:传递‘mysql_fetch_row’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:552: 附注:需要类型‘struct MYSQL_RES *’,但实参的类型为‘char **’
_mysql.c:1369: 错误:‘Py_BEGIN_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:1369: 警告:语句不起作用
_mysql.c:1370: 错误:‘_mysql_ResultObject’没有名为‘result’的成员
_mysql.c:1370: 警告:传递‘mysql_fetch_row’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:552: 附注:需要类型‘struct MYSQL_RES *’,但实参的类型为‘char **’
_mysql.c:1371: 错误:‘Py_END_ALLOW_THREADS’未声明(在此函数内第一次使用)
_mysql.c:1371: 警告:语句不起作用
_mysql.c:1373: 错误:‘_mysql_ResultObject’没有名为‘conn’的成员
_mysql.c:1373: 错误:‘_mysql_ConnectionObject’没有名为‘connection’的成员
_mysql.c:1373: 警告:传递‘mysql_errno’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:428: 附注:需要类型‘struct MYSQL *’,但实参的类型为‘char * (*)[1]’
_mysql.c:1374: 错误:‘_mysql_ResultObject’没有名为‘conn’的成员
_mysql.c:1378: 警告:隐式声明函数‘_PyTuple_Resize’
_mysql.c:1378: 错误:‘r’未声明(在此函数内第一次使用)
_mysql.c:1381: 警告:隐式声明函数‘convert_row’
_mysql.c:1381: 警告:语句不起作用
_mysql.c: 在文件层:
_mysql.c:1399: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1478: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1506: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1528: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1568: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1597: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1612: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1627: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1642: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1658: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1693: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1711: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1734: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1751: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1767: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1796: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1819: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1849: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1871: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1898: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1919: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1960: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1980: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c: 在函数‘_mysql_ConnectionObject_dealloc’中:
_mysql.c:2014: 错误:‘PyObject’未声明(在此函数内第一次使用)
_mysql.c:2014: 错误:‘o’未声明(在此函数内第一次使用)
_mysql.c:2014: 错误:双目运算符 * 操作数(‘char **’和‘char **’)无效
_mysql.c:2014: 警告:语句不起作用
_mysql.c:2017: 错误:‘_mysql_ConnectionObject’没有名为‘open’的成员
_mysql.c:2018: 警告:隐式声明函数‘_mysql_ConnectionObject_close’
_mysql.c:2018: 错误:‘NULL’未声明(在此函数内第一次使用)
_mysql.c:2018: 警告:语句不起作用
_mysql.c:2021: 警告:隐式声明函数‘PyMem_Free’
_mysql.c: 在文件层:
_mysql.c:2024: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2041: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2056: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2078: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c: 在函数‘_mysql_ResultObject_dealloc’中:
_mysql.c:2100: 错误:‘_mysql_ResultObject’没有名为‘result’的成员
_mysql.c:2100: 警告:传递‘mysql_free_result’的第 1 个参数时在不兼容的指针类型间转换
/usr/include/mysql/mysql.h:545: 附注:需要类型‘struct MYSQL_RES *’,但实参的类型为‘char **’
_mysql.c: 在文件层:
_mysql.c:2105: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2115: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_methods’
_mysql.c:2330: 错误:数组元素的类型不完全
_mysql.c:2331: 错误:‘T_INT’未声明(不在函数内)
_mysql.c:2331: 警告:隐式声明函数‘offsetof’
_mysql.c:2331: 错误:expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2331: 错误:‘RO’未声明(不在函数内)
_mysql.c:2338: 错误:‘T_OBJECT’未声明(不在函数内)
_mysql.c:2338: 错误:expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2345: 错误:‘T_UINT’未声明(不在函数内)
_mysql.c:2345: 错误:expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2352: 错误:expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2359: 错误:expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2366: 错误:‘NULL’未声明(不在函数内)
_mysql.c:2369: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_methods’
_mysql.c:2421: 错误:数组元素的类型不完全
_mysql.c:2422: 错误:expected expression before ‘_mysql_ResultObject’
_mysql.c:2432: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2460: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2490: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: 在函数‘_mysql_ConnectionObject_setattr’中:
_mysql.c:2492: 错误:‘v’未声明(在此函数内第一次使用)
_mysql.c:2493: 警告:隐式声明函数‘PyErr_SetString’
_mysql.c:2493: 错误:‘PyExc_AttributeError’未声明(在此函数内第一次使用)
_mysql.c:2498: 警告:隐式声明函数‘PyMember_Set’
_mysql.c: 在文件层:
_mysql.c:2515: 错误:expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: 在函数‘_mysql_ResultObject_setattr’中:
_mysql.c:2517: 错误:‘v’未声明(在此函数内第一次使用)
_mysql.c:2518: 错误:‘PyExc_AttributeError’未声明(在此函数内第一次使用)
_mysql.c: 在文件层:
_mysql.c:2536: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_Type’
_mysql.c:2620: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_Type’
_mysql.c:2706: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_methods’
_mysql.c:2778: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2810: 警告:返回类型默认为‘int’
_mysql.c: 在函数‘DL_EXPORT’中:
_mysql.c:2810: 错误:expected declaration specifiers before ‘init_mysql’
_mysql.c:2888: 错误:expected ‘{’ at end of input
error: command 'gcc' failed with exit status 1

python2.6.6安装MySQL-python模块正确方法的更多相关文章

  1. Python安装MySQL数据库模块

    背景 折腾: [记录]使用Python操作MySQL数据库 的过程中,需要去安装MySQLdb. 下载MySQLdb 去官网: http://pypi.python.org/pypi/MySQL-py ...

  2. 安装ANSYS19.0的正确方法(附下载)

    安装ANSYS19.0的正确方法 卸载干净旧版本ANSYS 安装或重新安装之前必须先卸载干净,安装过旧版本ANSYS的也要确保卸载干净.电脑环境准备参考以下内容 ANSYS 卸载后重装需要注意的问题_ ...

  3. 详解Python模块导入方法

    python常被昵称为胶水语言,它能很轻松的把用其他语言制作的各种模块(尤其是C/C++)轻松联结在一起.python包含子目录中的模块方法比较简单,关键是能够在sys.path里面找到通向模块文件的 ...

  4. BayaiM__Linux安装MySQL的两种方法

    BayaiM__Linux安装MySQL的两种方法     < 以下内容,纯属抄袭,如有雷同,爱咋咋地 >  阅读(21210) | 评论(4340) | 转发(5660) | 删除 编辑 ...

  5. 安装第三方Python模块,增加InfoPi的健壮性

    这3个第三方Python模块是可选的,不安装的话InfoPi也可以运行. 但是如果安装了,会增加InfoPi的健壮性. 目录 1.cchardet    自动检测文本编码 2.lxml    用于解析 ...

  6. 双击更新所有已安装的python模块

     首先声明我是一个升级控.几乎每天会查看一下手机.电脑是否有新的应用需要更新. 同样,我的python模块也是这样.百度了一下,发现目前还没有人将更新所有模块做成一件命令,但是查到了指引,主要就是两个 ...

  7. windows 上安装冷门python模块

    最近在逼乎看到 笑虎大大 的python 撸代码学知识专栏..就下载他的Pspider 框架 安装了一下,准备耍耍. 由于是在Windows下的pycharm 有个 pybloom_live 模块 老 ...

  8. linux下安装mysql的三种方法:rpm包安装、yum安装、源码包安装

    1 安装MySQL数据库服务器安装方法一://查询系统自带的数据库rpm -qa | grep -i mysql //卸载查询到的所有mysqlrpm -e --nodeps mysql-libs-5 ...

  9. c#项目调用Python模块的方法

    将Python模块用pyinstaller打包成exe程序 下载安装UPX((http://upx.sourceforge.net/)) ,并把路径加到环境变量中. UPX是开源的加壳和压缩exe的程 ...

随机推荐

  1. Microsoft Visual 的变态

    Microsoft Visual 里面使用指针 的时候, 声明要放在函数开始的位置,否则报错,真变态啊 刚刚发现,C的变量必须在语块开始声明,后面声明会报错,太不灵活了

  2. sql2000/sql2005/sql2008数据库变为0字节修复/MDF文件0字节恢复

    [数据恢复故障描述]  这个客户是生产型数据库,数据比较重要,产生量也比较大,客户要求必须尽快修复,保证生产尽快恢复运行.sql数据库文件,由于碎片链接过长,mdf文件突然变为0字节,开始客户尝试自行 ...

  3. bzoj1113

    传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1113 题解:单调栈 代码: #include<iostream> #includ ...

  4. 51NOD 1639 绑鞋带 数学

    http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1639 假如一开始有一根绳子. 那么增加一根的时候,可以插在它的尾部,也可 ...

  5. YII 1.0 上传文件

    $upload = CUploadedFile::getInstance($articleModel,'thumb'); if($upload){ $name = date("Ymd&quo ...

  6. Hybird应用开发实践(一)使用原生/cordova混合项目

    最近准备尝试hybird开发原生应用,因为公司的项目本来就是原生开发的,所以准备选择cordova作为webview嵌入原生项目的开发方式.这里就以mac上整合ios项目为例. 1. 创建cordov ...

  7. JSP EL表达式使用

    JSP EL表达式使用: Servlet: package com.stono.servlet; import java.io.IOException; import java.util.HashMa ...

  8. SVG六基本元素

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. 配置FMS发布/HDS/HLS流

    一.前言 安装完FMS4.5以后就有了apache2.2,由于在FMS安装目录里面,他是对外面已经安装的是没有影响的,默认情况向, FMS监听80端口接收traffic然后传递给Apache的8134 ...

  10. SoapUI:使用Excel进行参数化

    本章中学习如下内容: 1)         使用DataSource调用Excel中的数据给接口参数化: 2)         使用DataSource Loop使得测试用例根据Excel中的取值循环 ...