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. html css基础(一)

    1.HTML:做静态网页,是一种标签语言, HTML结构: 一个HTML文档由4个基本部分组成: ① 一个文档声明:<!DOCTYPE HTML> ② 一个html标签对:<html ...

  2. java系列--HTTP协议

    一.HTTP请求信息 请求行 请求头 空行 消息体 1.防盗链: 枚举类型: 二.中文乱码问题 1.Get提交 String username = request.getParameter(" ...

  3. Python知识小点(备注)

    (1)if __name__ == '__main__': 的作用是让后面的代码只有文件被作为程序执行时才有效,作为库加载时不执行

  4. DOMContentLoaded

    setTimeout(function(){ alert("settimeout"); },0); EventUtil.addHandler(window, "DOMCo ...

  5. iOS 之 支付

    现在广泛应用的是微信支付和支付宝支付,这两种应该覆盖了几乎所有网上消费的用户,所以我们就用这两种支付方式就够了.2014年用过支付宝的网民购物占比有94%. 1. iOS 之 微信支付 2. iOS ...

  6. IOS 上线问题

    info.plist 是否支持后台位置 音频 Info.plist中添加UIBackgroundModes键值,它包含一个或多个string的值,包括 audio:在后台提供声音播放功能,包括音频流和 ...

  7. ubuntu 15.10安装搜狗输入法不能打开

    安装Linux是为了更好的做开发,而开发其实不需要输入中文的,然而 在大中国的环境下,电脑没有中文输入法是不行的... 这次装ubuntu 坚持了4天没有中文输入法,我能说,其实没有中文输入法貌似也没 ...

  8. java的WindowBuilder可视化插件

    一直做在安卓用xml作界面,对于java的控件不熟悉,也不习惯用代码做UI尤其是布局. 找了一下发现可以安装windowbuilder来实现java的可视化编程,但是很多资料里的连接都失效了. 刚自己 ...

  9. 关于android:id="@+id/xx"的理解

    之前学习android的时候,对android:id="@+id/xx"总感觉混淆,不理解,刚看了一篇文章.现在貌似是恍然大悟.故做了一下笔记,希望帮助有共同问题的人... and ...

  10. Jq对象与dom对象的互相转换!

    JQ对象转化成dom对象 var a=$('div'); var b=a[0];//dom对象 转化成dom对象以后就可以使用dom方法了 dom对象转化成jq对象 var a=document.ge ...