- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我想在 CentO 上运行一个 django 项目。我尝试通过 easy_install 和 pip 安装 mysql-python,但我都遇到了错误。我用谷歌搜索了这个问题并找到了一些建议,但没有一个对我有帮助。
错误是:
_mysql.c:29:20: error: Python.h: No such file or directory
_mysql.c:40:26: error: structmember.h: No such file or directory
_mysql.c:74: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:75: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:76: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:78: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:79: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:80: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:81: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:82: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:83: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:84: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:87: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
_mysql.c:97: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_Type’
_mysql.c:100: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
_mysql.c:108: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_Type’
_mysql.c:127: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:261: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:361: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:379: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:402: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:403: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: In function ‘_mysql_ResultObject_Initialize’:
_mysql.c:405: error: ‘NULL’ undeclared (first use in this function)
_mysql.c:405: error: (Each undeclared identifier is reported only once
_mysql.c:405: error: for each function it appears in.)
_mysql.c:407: warning: initialization from incompatible pointer type
_mysql.c:409: error: ‘PyObject’ undeclared (first use in this function)
_mysql.c:409: error: ‘conv’ undeclared (first use in this function)
_mysql.c:409: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:409: warning: statement with no effect
_mysql.c:413: warning: implicit declaration of function ‘PyArg_ParseTupleAndKeywords’
_mysql.c:413: error: ‘args’ undeclared (first use in this function)
_mysql.c:413: error: ‘kwargs’ undeclared (first use in this function)
_mysql.c:417: warning: implicit declaration of function ‘PyDict_New’
_mysql.c:421: warning: implicit declaration of function ‘Py_INCREF’
_mysql.c:423: error: ‘_mysql_ResultObject’ has no member named ‘conn’
_mysql.c:423: error: expected expression before ‘)’ token
_mysql.c:423: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:423: warning: statement with no effect
_mysql.c:425: error: ‘_mysql_ResultObject’ has no member named ‘use’
_mysql.c:425: warning: statement with no effect
_mysql.c:426: error: ‘Py_BEGIN_ALLOW_THREADS’ undeclared (first use in this function)
_mysql.c:426: warning: statement with no effect
_mysql.c:428: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:428: warning: passing argument 1 of ‘mysql_use_result’ from incompatible pointer type
/usr/include/mysql/mysql.h:401: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:430: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:430: warning: passing argument 1 of ‘mysql_store_result’ from incompatible pointer type
/usr/include/mysql/mysql.h:400: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:431: error: ‘_mysql_ResultObject’ has no member named ‘result’
_mysql.c:431: warning: statement with no effect
_mysql.c:432: error: ‘Py_END_ALLOW_THREADS’ undeclared (first use in this function)
_mysql.c:432: warning: statement with no effect
_mysql.c:434: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:434: warning: passing argument 1 of ‘mysql_field_count’ from incompatible pointer type
/usr/include/mysql/mysql.h:368: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:435: warning: implicit declaration of function ‘_mysql_Exception’
_mysql.c:438: error: ‘_mysql_ResultObject’ has no member named ‘converter’
_mysql.c:438: warning: implicit declaration of function ‘PyTuple_New’
_mysql.c:438: warning: statement with no effect
_mysql.c:439: warning: implicit declaration of function ‘Py_DECREF’
_mysql.c:443: error: ‘_mysql_ResultObject’ has no member named ‘nfields’
_mysql.c:443: warning: statement with no effect
_mysql.c:444: error: ‘_mysql_ResultObject’ has no member named ‘converter’
_mysql.c:450: error: ‘tmp’ undeclared (first use in this function)
_mysql.c:450: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:450: error: ‘fun’ undeclared (first use in this function)
_mysql.c:450: warning: left-hand operand of comma expression has no effect
_mysql.c:450: warning: statement with no effect
_mysql.c:451: warning: implicit declaration of function ‘PyInt_FromLong’
_mysql.c:451: warning: statement with no effect
_mysql.c:456: warning: implicit declaration of function ‘PyObject_GetItem’
_mysql.c:456: warning: statement with no effect
_mysql.c:459: warning: implicit declaration of function ‘PyErr_Occurred’
_mysql.c:460: warning: implicit declaration of function ‘PyErr_ExceptionMatches’
_mysql.c:460: error: ‘PyExc_KeyError’ undeclared (first use in this function)
_mysql.c:464: warning: implicit declaration of function ‘PyErr_Clear’
_mysql.c:466: error: ‘Py_None’ undeclared (first use in this function)
_mysql.c:466: warning: statement with no effect
_mysql.c:469: warning: implicit declaration of function ‘PySequence_Check’
_mysql.c:470: warning: implicit declaration of function ‘PySequence_Size’
_mysql.c:471: error: ‘fun2’ undeclared (first use in this function)
_mysql.c:471: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:471: warning: statement with no effect
_mysql.c:473: error: ‘t’ undeclared (first use in this function)
_mysql.c:473: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:473: warning: implicit declaration of function ‘PySequence_GetItem’
_mysql.c:473: warning: statement with no effect
_mysql.c:479: warning: implicit declaration of function ‘PyTuple_Check’
_mysql.c:479: warning: implicit declaration of function ‘PyTuple_GET_SIZE’
_mysql.c:481: error: ‘pmask’ undeclared (first use in this function)
_mysql.c:481: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:481: warning: statement with no effect
_mysql.c:482: warning: implicit declaration of function ‘PyTuple_GET_ITEM’
_mysql.c:482: warning: statement with no effect
_mysql.c:483: warning: statement with no effect
_mysql.c:484: warning: implicit declaration of function ‘PyInt_Check’
_mysql.c:485: warning: implicit declaration of function ‘PyInt_AS_LONG’
_mysql.c:495: warning: statement with no effect
_mysql.c:504: warning: statement with no effect
_mysql.c:507: warning: statement with no effect
_mysql.c:509: warning: implicit declaration of function ‘PyTuple_SET_ITEM’
_mysql.c:509: error: ‘_mysql_ResultObject’ has no member named ‘converter’
_mysql.c: In function ‘_mysql_ResultObject_clear’:
_mysql.c:535: warning: implicit declaration of function ‘Py_XDECREF’
_mysql.c:535: error: ‘_mysql_ResultObject’ has no member named ‘converter’
_mysql.c:536: error: ‘_mysql_ResultObject’ has no member named ‘converter’
_mysql.c:536: error: ‘NULL’ undeclared (first use in this function)
_mysql.c:536: warning: statement with no effect
_mysql.c:537: error: ‘_mysql_ResultObject’ has no member named ‘conn’
_mysql.c:538: error: ‘_mysql_ResultObject’ has no member named ‘conn’
_mysql.c:538: warning: statement with no effect
_mysql.c: At top level:
_mysql.c:545: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:546: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
_mysql.c:548: error: ‘NULL’ undeclared (first use in this function)
_mysql.c:548: warning: initialization from incompatible pointer type
_mysql.c:549: error: ‘PyObject’ undeclared (first use in this function)
_mysql.c:549: error: ‘conv’ undeclared (first use in this function)
_mysql.c:549: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:549: warning: statement with no effect
_mysql.c:550: error: ‘ssl’ undeclared (first use in this function)
_mysql.c:550: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:550: warning: statement with no effect
_mysql.c:552: warning: initialization from incompatible pointer type
_mysql.c:552: warning: initialization from incompatible pointer type
_mysql.c:552: warning: initialization from incompatible pointer type
_mysql.c:553: warning: initialization from incompatible pointer type
_mysql.c:553: warning: initialization from incompatible pointer type
_mysql.c:555: warning: initialization from incompatible pointer type
_mysql.c:555: warning: initialization from incompatible pointer type
_mysql.c:555: warning: initialization from incompatible pointer type
_mysql.c:556: warning: initialization from incompatible pointer type
_mysql.c:556: warning: initialization from incompatible pointer type
_mysql.c:569: error: initializer element is not constant
_mysql.c:569: error: (near initialization for ‘kwlist[17]’)
_mysql.c:575: warning: initialization from incompatible pointer type
_mysql.c:576: warning: initialization from incompatible pointer type
_mysql.c:577: warning: initialization from incompatible pointer type
_mysql.c:579: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
_mysql.c:579: warning: statement with no effect
_mysql.c:580: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
_mysql.c:580: warning: statement with no effect
_mysql.c:583: error: ‘args’ undeclared (first use in this function)
_mysql.c:583: error: ‘kwargs’ undeclared (first use in this function)
_mysql.c:616: error: ‘value’ undeclared (first use in this function)
_mysql.c:616: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:616: warning: statement with no effect
_mysql.c:617: warning: implicit declaration of function ‘PyMapping_GetItemString’
_mysql.c:617: warning: statement with no effect
_mysql.c:617: warning: implicit declaration of function ‘PyString_AsString’
_mysql.c:617: warning: assignment makes pointer from integer without a cast
_mysql.c:618: warning: statement with no effect
_mysql.c:618: warning: assignment makes pointer from integer without a cast
_mysql.c:619: warning: statement with no effect
_mysql.c:619: warning: assignment makes pointer from integer without a cast
_mysql.c:620: warning: statement with no effect
_mysql.c:620: warning: assignment makes pointer from integer without a cast
_mysql.c:621: warning: statement with no effect
_mysql.c:621: warning: assignment makes pointer from integer without a cast
_mysql.c:629: error: ‘Py_BEGIN_ALLOW_THREADS’ undeclared (first use in this function)
_mysql.c:629: warning: statement with no effect
_mysql.c:630: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:630: warning: passing argument 1 of ‘mysql_init’ from incompatible pointer type
/usr/include/mysql/mysql.h:380: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:633: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:634: warning: passing argument 1 of ‘mysql_options’ from incompatible pointer type
/usr/include/mysql/mysql.h:445: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:639: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:640: warning: passing argument 1 of ‘mysql_options’ from incompatible pointer type
/usr/include/mysql/mysql.h:445: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:644: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:644: warning: passing argument 1 of ‘mysql_options’ from incompatible pointer type
/usr/include/mysql/mysql.h:445: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:648: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:648: warning: passing argument 1 of ‘mysql_options’ from incompatible pointer type
/usr/include/mysql/mysql.h:445: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:649: warning: comparison of distinct pointer types lacks a cast
_mysql.c:650: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:650: warning: passing argument 1 of ‘mysql_options’ from incompatible pointer type
/usr/include/mysql/mysql.h:445: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:651: warning: comparison of distinct pointer types lacks a cast
_mysql.c:652: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:652: warning: passing argument 1 of ‘mysql_options’ from incompatible pointer type
/usr/include/mysql/mysql.h:445: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:653: warning: comparison of distinct pointer types lacks a cast
_mysql.c:654: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:654: warning: passing argument 1 of ‘mysql_options’ from incompatible pointer type
/usr/include/mysql/mysql.h:445: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:657: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:657: warning: passing argument 1 of ‘mysql_options’ from incompatible pointer type
/usr/include/mysql/mysql.h:445: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:661: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:662: warning: passing argument 1 of ‘mysql_ssl_set’ from incompatible pointer type
/usr/include/mysql/mysql.h:381: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:665: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:666: warning: passing argument 1 of ‘mysql_real_connect’ from incompatible pointer type
/usr/include/mysql/mysql.h:387: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:668: error: ‘Py_END_ALLOW_THREADS’ undeclared (first use in this function)
_mysql.c:668: warning: statement with no effect
_mysql.c:677: warning: statement with no effect
_mysql.c:683: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
_mysql.c:683: warning: statement with no effect
_mysql.c:691: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
_mysql.c:691: warning: statement with no effect
_mysql.c: At top level:
_mysql.c:749: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c: In function ‘_mysql_ConnectionObject_clear’:
_mysql.c:781: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
_mysql.c:782: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
_mysql.c:782: error: ‘NULL’ undeclared (first use in this function)
_mysql.c:782: warning: statement with no effect
_mysql.c: At top level:
_mysql.c:789: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:817: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:833: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:851: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:870: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:896: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:918: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:950: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:976: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1003: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1022: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1039: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1055: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1077: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1124: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1167: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1169: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1203: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1233: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1267: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1299: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1335: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1359: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1389: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1414: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1453: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1492: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1497: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c:1500: error: expected declaration specifiers or ‘...’ before ‘_PYFUNC’
_mysql.c: In function ‘_mysql__fetch_row’:
_mysql.c:1506: error: ‘PyObject’ undeclared (first use in this function)
_mysql.c:1506: error: ‘v’ undeclared (first use in this function)
_mysql.c:1506: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:1506: warning: statement with no effect
_mysql.c:1507: error: ‘_mysql_ResultObject’ has no member named ‘use’
_mysql.c:1508: error: ‘_mysql_ResultObject’ has no member named ‘result’
_mysql.c:1508: warning: passing argument 1 of ‘mysql_fetch_row’ from incompatible pointer type
/usr/include/mysql/mysql.h:454: note: expected ‘struct MYSQL_RES *’ but argument is of type ‘char **’
_mysql.c:1510: error: ‘Py_BEGIN_ALLOW_THREADS’ undeclared (first use in this function)
_mysql.c:1510: warning: statement with no effect
_mysql.c:1511: error: ‘_mysql_ResultObject’ has no member named ‘result’
_mysql.c:1511: warning: passing argument 1 of ‘mysql_fetch_row’ from incompatible pointer type
/usr/include/mysql/mysql.h:454: note: expected ‘struct MYSQL_RES *’ but argument is of type ‘char **’
_mysql.c:1512: error: ‘Py_END_ALLOW_THREADS’ undeclared (first use in this function)
_mysql.c:1512: warning: statement with no effect
_mysql.c:1514: error: ‘_mysql_ResultObject’ has no member named ‘conn’
_mysql.c:1514: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
_mysql.c:1514: warning: passing argument 1 of ‘mysql_errno’ from incompatible pointer type
/usr/include/mysql/mysql.h:371: note: expected ‘struct MYSQL *’ but argument is of type ‘char * (*)[1]’
_mysql.c:1515: error: ‘_mysql_ResultObject’ has no member named ‘conn’
_mysql.c:1519: warning: implicit declaration of function ‘_PyTuple_Resize’
_mysql.c:1519: error: ‘r’ undeclared (first use in this function)
_mysql.c:1522: warning: implicit declaration of function ‘convert_row’
_mysql.c:1522: warning: statement with no effect
_mysql.c: At top level:
_mysql.c:1540: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1619: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1647: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1673: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1713: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1755: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1774: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1793: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1808: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1828: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1867: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1885: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1908: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1925: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1941: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1970: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:1993: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2023: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2045: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2072: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2098: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2139: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2159: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c: In function ‘_mysql_ConnectionObject_dealloc’:
_mysql.c:2193: error: ‘PyObject’ undeclared (first use in this function)
_mysql.c:2193: error: ‘o’ undeclared (first use in this function)
_mysql.c:2193: error: invalid operands to binary * (have ‘char **’ and ‘char **’)
_mysql.c:2193: warning: statement with no effect
_mysql.c:2196: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
_mysql.c:2197: warning: implicit declaration of function ‘_mysql_ConnectionObject_close’
_mysql.c:2197: error: ‘NULL’ undeclared (first use in this function)
_mysql.c:2197: warning: statement with no effect
_mysql.c:2200: warning: implicit declaration of function ‘PyMem_Free’
_mysql.c: At top level:
_mysql.c:2203: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2224: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2239: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2261: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c: In function ‘_mysql_ResultObject_dealloc’:
_mysql.c:2283: error: ‘_mysql_ResultObject’ has no member named ‘result’
_mysql.c:2283: warning: passing argument 1 of ‘mysql_free_result’ from incompatible pointer type
/usr/include/mysql/mysql.h:447: note: expected ‘struct MYSQL_RES *’ but argument is of type ‘char **’
_mysql.c: At top level:
_mysql.c:2288: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2302: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_methods’
_mysql.c:2517: error: array type has incomplete element type
_mysql.c:2518: error: ‘T_INT’ undeclared here (not in a function)
_mysql.c:2518: warning: implicit declaration of function ‘offsetof’
_mysql.c:2518: error: expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2518: error: ‘READONLY’ undeclared here (not in a function)
_mysql.c:2525: error: ‘T_OBJECT’ undeclared here (not in a function)
_mysql.c:2525: error: expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2532: error: ‘T_UINT’ undeclared here (not in a function)
_mysql.c:2532: error: expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2539: error: expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2546: error: expected expression before ‘_mysql_ConnectionObject’
_mysql.c:2553: error: ‘NULL’ undeclared here (not in a function)
_mysql.c:2556: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_methods’
_mysql.c:2608: error: array type has incomplete element type
_mysql.c:2609: error: expected expression before ‘_mysql_ResultObject’
_mysql.c:2619: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2649: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:2681: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: In function ‘_mysql_ConnectionObject_setattr’:
_mysql.c:2683: error: ‘v’ undeclared (first use in this function)
_mysql.c:2684: warning: implicit declaration of function ‘PyErr_SetString’
_mysql.c:2684: error: ‘PyExc_AttributeError’ undeclared (first use in this function)
_mysql.c:2689: warning: implicit declaration of function ‘PyMember_Set’
_mysql.c: At top level:
_mysql.c:2706: error: expected declaration specifiers or ‘...’ before ‘PyObject’
_mysql.c: In function ‘_mysql_ResultObject_setattr’:
_mysql.c:2708: error: ‘v’ undeclared (first use in this function)
_mysql.c:2709: error: ‘PyExc_AttributeError’ undeclared (first use in this function)
_mysql.c: At top level:
_mysql.c:2727: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_Type’
_mysql.c:2815: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_Type’
_mysql.c:2905: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_methods’
_mysql.c:2977: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
_mysql.c:3022: warning: return type defaults to ‘int’
_mysql.c: In function ‘DL_EXPORT’:
_mysql.c:3022: error: expected declaration specifiers before ‘init_mysql’
_mysql.c:3130: error: expected ‘{’ at end of input
error: Setup script exited with error: command 'gcc' failed with exit status 1
最佳答案
我认为您需要先安装 python 开发库:
yum install python-devel
关于python - CentOs安装mysql-python返返回错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13044201/
我正在使用 CentOS 6 机器。我尝试遵循以下指南: How to open port in centOS http://ask.xmodulo.com/open-port-firewall-ce
我正在为 CentOS 7 创建一个脚本,但我正在努力根据变量连接值,这与我工作的其他发行版不同。例如,在下面的代码中: DIR_BKP=/tmp/_bkp_local PATH_LOG=$DIR_B
我从以下位置下载了文件: https://github.com/christiangalsterer/httpbeat/releaseshttpbeat-4.0.0-x86_64.rpm 并尝试通过以
我想在我的 Centos 8 中使用命令 mkimage。 我尝试使用命令 dnf install uboot-tools 以 root 身份安装 uboot-tools 但这不可用。 谁能指导我如何
我有一个 Centos 服务器。 结果 $ cat /etc/centos-release CentOS Linux release 7.9.2009 (Core) 和 $ yum list i
我在CentOs7 上安装Gitlab 后遇到了麻烦。我第一次被重定向到管理员密码创建页面,在输入管理员用户密码后,服务器发送错误。 422 The change you requested was
因此,我正在尝试从我的一个运行 centos 的邮箱中发送电子邮件,并且我已经安装并打开了 sendmail,但是发送一封电子邮件实际上需要几分钟时间。电子邮件不是应该几乎是即时的吗? 这是我的/et
我正在尝试在虚拟 Centos 7 发行版上构建一些 C++ 库。由于我还没有发现这个操作系统看不到/usr/local/lib 或/usr/local/lib64 的原因,这些库安装在其他 linu
我正在尝试通过以下网址在我的服务器(centos 7.1 minimal)上安装 imagemagick: imagemagick installation steps 在第 1 步得到这个错误: L
当我尝试安装 rpmforge(我需要安装 phpmyadmin)时出现此错误,将不胜感激任何帮助! [root@plasticarmy ~]# yum http://pkgs.repoforge.o
我需要安装一个centos 5 repo 来在centos 7 机器上下载用于el5 的dhclient,以便在centos 5 机器上传输dhclient rpms。有可能的 ? 谢谢! 最佳答案
我正在开发一个可以在 CentOS 8 和 CentOS 7 系统上运行的程序。在其中,我使用 gethostbyname 将 DNS 名称解析为 IP 地址。 为了尝试使代码可移植,我正在使用以下命
我想在 CentOS7(或 CentOS6)上安装 cgal 模块。它需要 pgrouting 才能使用 PostGIS。 我一直用 CGAL Manual Installation 安装 cgal
我在 CentOS 平台上使用 R/RStudio。我需要查看二进制日志文件(/var/log/messages)是否包含有关图形设备绘图问题的更多信息,但我无法从 RStudio 中读取它。 我在社
我正在尝试在我的 CentOS 上本地安装 Kubernetes。我正在关注这个博客 http://containertutorials.com/get_started_kubernetes/inde
来自 http://kubernetes.io/docs/getting-started-guides/kubeadm/ CentOS Linux 版本 7.2.1511(核心) (1/4) 在主机上
使用tcpdump监控网络流量时,发现很多dns反向查询记录。 像这样: A_IP.55276 > DNS_IP.domain: 9247+ PTR?查询 IP.in-addr.arpa。 (45)
我正在尝试在 CentOS 6.7 和 ./configure --prefix=$HOME/local 上安装 mutt运行良好,但在 make install步骤,我在下面遇到了这个错误,我不知道
如何在 CENTOS 中删除所有以 *0x0.jpg 结尾的文件?我需要删除嵌套在文件夹和子文件夹中的多个文件 最佳答案 我假设你有一个外壳 - 试试 find /mydirectory -type
我需要检索安装在我的 Linux (Centos) 主机上的所有软件包的软件包版本。 rpm -qa 给了我所有已安装软件包的列表。 我知道 rpm -qi "package name"给了我包信息。
我是一名优秀的程序员,十分优秀!