Menu

Error in Installing Mysql-Python on Linux

Help
cpiyush
2008-09-17
2012-09-19
  • cpiyush

    cpiyush - 2008-09-17

    Hi,

    I am trying to install Mysql-Python interface on a Linux System.
    I am working on an older version of Python, i.e. Python2.3.3.
    Now I am trying to install the interface,i.e. MySQL-python-0.9.0.tar.gz

    When I am running "python setup.py build", it gives me error
    "error: command 'gcc' failed with exit status 1"

    I am sure I must be doing some real minor mistake, as I have done this in Windows for many times w/o any problems.

    Please suggest any way to install this interface.
    The configurations I am using are: -
    Python 2.3.3
    Mysql 5.0.45
    gcc 4.1.2
    MySQL-python-0.9.0

    Thanks
    Piyush.

     
    • Kyle VanderBeek

      Kyle VanderBeek - 2008-12-11

      I'm not sure how you got such an old version of the module, which is currently at version 1.2.2, available here:

      https://sourceforge.net/project/showfiles.php?group_id=22307

      Download a newer version and try again. Also, if you run into problems, we'd need more of the gcc output to be able to diagnose what is going awry.

       
    • ejm

      ejm - 2008-12-23

      Hello,

      I'm having perhaps the same problem, and I'm also sure it's some mishap on my part.

      Mysql installed via sudo yum install...

      [emitchell@dev06 MySQL-python-1.2.2]$ mysql --version
      mysql Ver 14.12 Distrib 5.0.51a, for redhat-linux-gnu (x86_64) using readline 5.0

      [emitchell@dev06 MySQL-python-1.2.2]$ gcc --version
      gcc (GCC) 4.3.0 20080428 (Red Hat 4.3.0-8)

      [emitchell@dev06 MySQL-python-1.2.2]$ python --version
      Python 2.5.1

      RedHat FC9, and I have not modified site.cfg, because I don't know what a mysql_config file is. Is it my.cnf?

      Trying to run python setup.py build. Error output is lengthy, and posted below.

      Thanks for any help. I'm really just hoping to have an egg or something I can drop in my site-packages on both this box and another Debian box running python 2.4.

      Last but not least -- Happy Holidays, and thanks for writing such cool software :>)

      [emitchell@dev06 MySQL-python-1.2.2]$ python setup.py build
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-2.5
      copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.5
      creating build/lib.linux-x86_64-2.5/MySQLdb
      copying MySQLdb/init.py -> build/lib.linux-x86_64-2.5/MySQLdb
      copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.5/MySQLdb
      copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.5/MySQLdb
      copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.5/MySQLdb
      copying MySQLdb/release.py -> build/lib.linux-x86_64-2.5/MySQLdb
      copying MySQLdb/times.py -> build/lib.linux-x86_64-2.5/MySQLdb
      creating build/lib.linux-x86_64-2.5/MySQLdb/constants
      copying MySQLdb/constants/init.py -> build/lib.linux-x86_64-2.5/MySQLdb/constants
      copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.5/MySQLdb/constants
      copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.5/MySQLdb/constants
      copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.5/MySQLdb/constants
      copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.5/MySQLdb/constants
      copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.5/MySQLdb/constants
      copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.5/MySQLdb/constants
      running build_ext
      building '_mysql' extension
      creating build/temp.linux-x86_64-2.5
      gcc -pthread -fno-strict-aliasing -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 -fPIC -Dversion_info=(1,2,2,'final',0) -Dversion=1.2.2 -I/usr/include/mysql -I/usr/include/python2.5 -c _mysql.c -o build/temp.linux-x86_64-2.5/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv
      _mysql.c:35:23: error: my_config.h: No such file or directory
      _mysql.c:40:19: error: mysql.h: No such file or directory
      _mysql.c:41:26: error: mysqld_error.h: No such file or directory
      _mysql.c:42:20: error: errmsg.h: No such file or directory
      _mysql.c:78: error: expected specifier-qualifier-list before ‘MYSQL’
      _mysql.c:92: error: expected specifier-qualifier-list before ‘MYSQL_RES’
      _mysql.c: In function ‘_mysql_Exception’:
      _mysql.c:122: warning: implicit declaration of function ‘mysql_errno’
      _mysql.c:122: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:125: error: ‘CR_MAX_ERROR’ undeclared (first use in this function)
      _mysql.c:125: error: (Each undeclared identifier is reported only once
      _mysql.c:125: error: for each function it appears in.)
      _mysql.c:133: error: ‘CR_COMMANDS_OUT_OF_SYNC’ undeclared (first use in this function)
      _mysql.c:134: error: ‘ER_DB_CREATE_EXISTS’ undeclared (first use in this function)
      _mysql.c:135: error: ‘ER_SYNTAX_ERROR’ undeclared (first use in this function)
      _mysql.c:136: error: ‘ER_PARSE_ERROR’ undeclared (first use in this function)
      _mysql.c:137: error: ‘ER_NO_SUCH_TABLE’ undeclared (first use in this function)
      _mysql.c:138: error: ‘ER_WRONG_DB_NAME’ undeclared (first use in this function)
      _mysql.c:139: error: ‘ER_WRONG_TABLE_NAME’ undeclared (first use in this function)
      _mysql.c:140: error: ‘ER_FIELD_SPECIFIED_TWICE’ undeclared (first use in this function)
      _mysql.c:141: error: ‘ER_INVALID_GROUP_FUNC_USE’ undeclared (first use in this function)
      _mysql.c:142: error: ‘ER_UNSUPPORTED_EXTENSION’ undeclared (first use in this function)
      _mysql.c:143: error: ‘ER_TABLE_MUST_HAVE_COLUMNS’ undeclared (first use in this function)
      _mysql.c:172: error: ‘ER_DUP_ENTRY’ undeclared (first use in this function)
      _mysql.c:215: warning: implicit declaration of function ‘mysql_error’
      _mysql.c:215: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:215: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast
      _mysql.c: In function ‘_mysql_server_init’:
      _mysql.c:310: warning: label ‘finish’ defined but not used
      _mysql.c:236: warning: unused variable ‘item’
      _mysql.c:235: warning: unused variable ‘groupc’
      _mysql.c:235: warning: unused variable ‘i’
      _mysql.c:235: warning: unused variable ‘cmd_argc’
      _mysql.c:234: warning: unused variable ‘s’
      _mysql.c: In function ‘_mysql_ResultObject_Initialize’:
      _mysql.c:365: error: ‘MYSQL_RES’ undeclared (first use in this function)
      _mysql.c:365: error: ‘result’ undeclared (first use in this function)
      _mysql.c:370: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
      _mysql.c:370: error: ‘fields’ undeclared (first use in this function)
      _mysql.c:379: error: ‘_mysql_ResultObject’ has no member named ‘use’
      _mysql.c:382: warning: implicit declaration of function ‘mysql_use_result’
      _mysql.c:382: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:384: warning: implicit declaration of function ‘mysql_store_result’
      _mysql.c:384: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:385: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:388: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:391: warning: implicit declaration of function ‘mysql_num_fields’
      _mysql.c:392: error: ‘_mysql_ResultObject’ has no member named ‘nfields’
      _mysql.c:393: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:394: warning: implicit declaration of function ‘mysql_fetch_fields’
      _mysql.c:438: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c: In function ‘_mysql_ResultObject_traverse’:
      _mysql.c:450: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:451: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c: In function ‘_mysql_ResultObject_clear’:
      _mysql.c:462: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:462: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:462: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:462: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:463: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
      _mysql.c:475: error: ‘MYSQL’ undeclared (first use in this function)
      _mysql.c:475: error: ‘conn’ undeclared (first use in this function)
      _mysql.c:484: error: ‘MYSQL_PORT’ undeclared (first use in this function)
      _mysql.c:500: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c:501: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:524: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c:546: warning: implicit declaration of function ‘mysql_init’
      _mysql.c:546: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:549: warning: implicit declaration of function ‘mysql_options’
      _mysql.c:549: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:549: error: ‘MYSQL_OPT_CONNECT_TIMEOUT’ undeclared (first use in this function)
      _mysql.c:553: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:553: error: ‘MYSQL_OPT_COMPRESS’ undeclared (first use in this function)
      _mysql.c:554: error: ‘CLIENT_COMPRESS’ undeclared (first use in this function)
      _mysql.c:557: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:557: error: ‘MYSQL_OPT_NAMED_PIPE’ undeclared (first use in this function)
      _mysql.c:559: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:559: error: ‘MYSQL_INIT_COMMAND’ undeclared (first use in this function)
      _mysql.c:561: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:561: error: ‘MYSQL_READ_DEFAULT_FILE’ undeclared (first use in this function)
      _mysql.c:563: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:563: error: ‘MYSQL_READ_DEFAULT_GROUP’ undeclared (first use in this function)
      _mysql.c:566: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:566: error: ‘MYSQL_OPT_LOCAL_INFILE’ undeclared (first use in this function)
      _mysql.c:574: warning: implicit declaration of function ‘mysql_real_connect’
      _mysql.c:574: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:589: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c: In function ‘_mysql_ConnectionObject_traverse’:
      _mysql.c:670: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c:671: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c: In function ‘_mysql_ConnectionObject_clear’:
      _mysql.c:679: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c:679: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c:679: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c:679: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c:680: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c: In function ‘_mysql_ConnectionObject_close’:
      _mysql.c:695: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:697: warning: implicit declaration of function ‘mysql_close’
      _mysql.c:697: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:699: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c: In function ‘_mysql_ConnectionObject_affected_rows’:
      _mysql.c:721: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:722: warning: implicit declaration of function ‘mysql_affected_rows’
      _mysql.c:722: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_debug’:
      _mysql.c:738: warning: implicit declaration of function ‘mysql_debug’
      _mysql.c: In function ‘_mysql_ConnectionObject_dump_debug_info’:
      _mysql.c:756: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:758: warning: implicit declaration of function ‘mysql_dump_debug_info’
      _mysql.c:758: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_autocommit’:
      _mysql.c:782: warning: implicit declaration of function ‘mysql_query’
      _mysql.c:782: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_commit’:
      _mysql.c:805: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_rollback’:
      _mysql.c:827: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_errno’:
      _mysql.c:939: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:940: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_error’:
      _mysql.c:955: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:956: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:956: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast
      _mysql.c: In function ‘_mysql_escape_string’:
      _mysql.c:980: warning: implicit declaration of function ‘mysql_escape_string’
      _mysql.c: In function ‘_mysql_escape’:
      _mysql.c:1087: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c: In function ‘_mysql_ResultObject_describe’:
      _mysql.c:1167: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
      _mysql.c:1167: error: ‘fields’ undeclared (first use in this function)
      _mysql.c:1170: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1171: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1172: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1183: warning: implicit declaration of function ‘IS_NOT_NULL’
      _mysql.c: In function ‘_mysql_ResultObject_field_flags’:
      _mysql.c:1203: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
      _mysql.c:1203: error: ‘fields’ undeclared (first use in this function)
      _mysql.c:1206: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1207: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1208: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c: At top level:
      _mysql.c:1249: error: expected declaration specifiers or ‘...’ before ‘MYSQL_ROW’
      _mysql.c: In function ‘_mysql_row_to_tuple’:
      _mysql.c:1255: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1257: warning: implicit declaration of function ‘mysql_fetch_lengths’
      _mysql.c:1257: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1257: warning: assignment makes pointer from integer without a cast
      _mysql.c:1260: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:1261: error: ‘row’ undeclared (first use in this function)
      _mysql.c: At top level:
      _mysql.c:1274: error: expected declaration specifiers or ‘...’ before ‘MYSQL_ROW’
      _mysql.c: In function ‘_mysql_row_to_dict’:
      _mysql.c:1279: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
      _mysql.c:1279: error: ‘fields’ undeclared (first use in this function)
      _mysql.c:1281: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1283: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1283: warning: assignment makes pointer from integer without a cast
      _mysql.c:1284: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1287: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:1288: error: ‘row’ undeclared (first use in this function)
      _mysql.c: At top level:
      _mysql.c:1313: error: expected declaration specifiers or ‘...’ before ‘MYSQL_ROW’
      _mysql.c: In function ‘_mysql_row_to_dict_old’:
      _mysql.c:1318: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
      _mysql.c:1318: error: ‘fields’ undeclared (first use in this function)
      _mysql.c:1320: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1322: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1322: warning: assignment makes pointer from integer without a cast
      _mysql.c:1323: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1326: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:1327: error: ‘row’ undeclared (first use in this function)
      _mysql.c: At top level:
      _mysql.c:1349: error: expected declaration specifiers or ‘...’ before ‘MYSQL_ROW’
      _mysql.c: In function ‘_mysql__fetch_row’:
      _mysql.c:1360: error: ‘MYSQL_ROW’ undeclared (first use in this function)
      _mysql.c:1360: error: expected ‘;’ before ‘row’
      _mysql.c:1364: error: ‘_mysql_ResultObject’ has no member named ‘use’
      _mysql.c:1365: error: ‘row’ undeclared (first use in this function)
      _mysql.c:1365: warning: implicit declaration of function ‘mysql_fetch_row’
      _mysql.c:1365: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1368: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:1371: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:1379: error: too many arguments to function ‘convert_row’
      _mysql.c: In function ‘_mysql_ResultObject_fetch_row’:
      _mysql.c:1403: error: expected declaration specifiers or ‘...’ before ‘MYSQL_ROW’
      _mysql.c:1418: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1430: error: ‘_mysql_ResultObject’ has no member named ‘use’
      _mysql.c:1444: warning: implicit declaration of function ‘mysql_num_rows’
      _mysql.c:1444: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c: In function ‘_mysql_ConnectionObject_character_set_name’:
      _mysql.c:1511: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c: In function ‘_mysql_get_client_info’:
      _mysql.c:1602: warning: implicit declaration of function ‘mysql_get_client_info’
      _mysql.c:1602: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast
      _mysql.c: In function ‘_mysql_ConnectionObject_get_host_info’:
      _mysql.c:1616: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1617: warning: implicit declaration of function ‘mysql_get_host_info’
      _mysql.c:1617: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:1617: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast
      _mysql.c: In function ‘_mysql_ConnectionObject_get_proto_info’:
      _mysql.c:1631: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1632: warning: implicit declaration of function ‘mysql_get_proto_info’
      _mysql.c:1632: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_get_server_info’:
      _mysql.c:1646: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1647: warning: implicit declaration of function ‘mysql_get_server_info’
      _mysql.c:1647: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:1647: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast
      _mysql.c: In function ‘_mysql_ConnectionObject_info’:
      _mysql.c:1663: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1664: warning: implicit declaration of function ‘mysql_info’
      _mysql.c:1664: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:1664: warning: assignment makes pointer from integer without a cast
      _mysql.c: In function ‘_mysql_ConnectionObject_insert_id’:
      _mysql.c:1696: error: ‘my_ulonglong’ undeclared (first use in this function)
      _mysql.c:1696: error: expected ‘;’ before ‘r’
      _mysql.c:1698: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1700: error: ‘r’ undeclared (first use in this function)
      _mysql.c:1700: warning: implicit declaration of function ‘mysql_insert_id’
      _mysql.c:1700: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_kill’:
      _mysql.c:1717: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1719: warning: implicit declaration of function ‘mysql_kill’
      _mysql.c:1719: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_field_count’:
      _mysql.c:1738: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1740: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ResultObject_num_fields’:
      _mysql.c:1755: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1756: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c: In function ‘_mysql_ResultObject_num_rows’:
      _mysql.c:1771: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1772: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c: In function ‘_mysql_ConnectionObject_ping’:
      _mysql.c:1801: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1802: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:1804: warning: implicit declaration of function ‘mysql_ping’
      _mysql.c:1804: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_query’:
      _mysql.c:1825: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1827: warning: implicit declaration of function ‘mysql_real_query’
      _mysql.c:1827: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_select_db’:
      _mysql.c:1855: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1857: warning: implicit declaration of function ‘mysql_select_db’
      _mysql.c:1857: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_shutdown’:
      _mysql.c:1876: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1878: warning: implicit declaration of function ‘mysql_shutdown’
      _mysql.c:1878: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_stat’:
      _mysql.c:1903: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1905: warning: implicit declaration of function ‘mysql_stat’
      _mysql.c:1905: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:1905: warning: assignment makes pointer from integer without a cast
      _mysql.c: In function ‘_mysql_ConnectionObject_store_result’:
      _mysql.c:1926: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1927: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c:1936: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c: In function ‘_mysql_ConnectionObject_thread_id’:
      _mysql.c:1965: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1967: warning: implicit declaration of function ‘mysql_thread_id’
      _mysql.c:1967: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ConnectionObject_use_result’:
      _mysql.c:1987: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:1988: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c:1997: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c: In function ‘_mysql_ConnectionObject_dealloc’:
      _mysql.c:2015: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c: In function ‘_mysql_ConnectionObject_repr’:
      _mysql.c:2027: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:2029: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c: In function ‘_mysql_ResultObject_data_seek’:
      _mysql.c:2046: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:2047: warning: implicit declaration of function ‘mysql_data_seek’
      _mysql.c:2047: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c: In function ‘_mysql_ResultObject_row_seek’:
      _mysql.c:2060: error: ‘MYSQL_ROW_OFFSET’ undeclared (first use in this function)
      _mysql.c:2060: error: expected ‘;’ before ‘r’
      _mysql.c:2062: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:2063: error: ‘_mysql_ResultObject’ has no member named ‘use’
      _mysql.c:2068: error: ‘r’ undeclared (first use in this function)
      _mysql.c:2068: warning: implicit declaration of function ‘mysql_row_tell’
      _mysql.c:2068: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:2069: warning: implicit declaration of function ‘mysql_row_seek’
      _mysql.c:2069: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c: In function ‘_mysql_ResultObject_row_tell’:
      _mysql.c:2081: error: ‘MYSQL_ROW_OFFSET’ undeclared (first use in this function)
      _mysql.c:2081: error: expected ‘;’ before ‘r’
      _mysql.c:2083: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:2084: error: ‘_mysql_ResultObject’ has no member named ‘use’
      _mysql.c:2089: error: ‘r’ undeclared (first use in this function)
      _mysql.c:2089: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c:2090: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c: In function ‘_mysql_ResultObject_dealloc’:
      _mysql.c:2098: warning: implicit declaration of function ‘mysql_free_result’
      _mysql.c:2098: error: ‘_mysql_ResultObject’ has no member named ‘result’
      _mysql.c: At top level:
      _mysql.c:2329: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      _mysql.c:2336: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
      _mysql.c:2343: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:2350: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:2357: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
      _mysql.c:2420: error: ‘_mysql_ResultObject’ has no member named ‘converter’
      _mysql.c:2420: error: initializer element is not constant
      _mysql.c:2420: error: (near initialization for ‘_mysql_ResultObject_memberlist[0].offset’)
      _mysql.c: In function ‘_mysql_ConnectionObject_getattr’:
      _mysql.c:2442: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
      error: command 'gcc' failed with exit status 1

       
      • Andy Dustman

        Andy Dustman - 2009-01-13

        My policy nowadays is not to answer questions which are answered in the README, but clearly you don't have the required development packages for MySQL installed.

         
    • ejm

      ejm - 2009-01-02

      I read in another thread that this output might also be helpful in understanding my problem:

      [emitchell@dev06 ~]$ mysql_config
      Usage: /usr/lib64/mysql/mysql_config [OPTIONS]
      Options:
      --cflags [-I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv]
      --include [-I/usr/include/mysql]
      --libs [-L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto]
      --libs_r [-L/usr/lib64/mysql -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -L/usr/lib64 -lssl -lcrypto]
      --socket [/var/lib/mysql/mysql.sock]
      --port [3306]
      --version [5.0.51a]
      --libmysqld-libs [-L/usr/lib64/mysql -lmysqld -lz -lpthread -lcrypt -lnsl -lm -lpthread -lrt -L/usr/lib64 -lssl -lcrypto]

      Thanks for any suggestions as to what might be wrong. I'm way out of my depth here.

       
    • Gary Park

      Gary Park - 2009-01-08

      Hey,

      I believe I am having the same issue as noted in this thread.

      I am trying to install MySQL-python on my ClarkConnect Box (which is based on RHEL4). I previously had this installed without any problems, but I have just re-installed the machine and upgraded the python version on the server.

      Are there any suggestions as to how I can get this to install correctly?

      Thanks

      Gary

       
    • Gary Park

      Gary Park - 2009-01-13

      Hello,

      Can no one help with this issue?

      Is this a known bug? I would really like to get this installed!!

      I am trying to make a Trac/SVN Server, and this is critical to that working.

      Thanks

      Gary

       
      • Leo Hourvitz

        Leo Hourvitz - 2009-01-13

        I don't know why this is happening, and I don't have a Linux box handy to go check, but this may help you diagnose your problem: In ejm's post, the first line of actual output from gcc is:

        _mysql.c:35:23: error: my_config.h: No such file or directory

        This means the -I flags on the compiler command line are somehow insufficient to letting the compiler find the include files it needs to build MySQL-Python. There could be any number of reasons for that, but one possibility is that you installed the mysql package, but not the mysql-devel package. The latter is sometimes installed separately and contains all the header and library files needed to build code that depends on MySQL.

        Again, I'm just guessing without having anything in front of me, so this may be unrelated to your particular problem.

        Leo

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.