[rhelv6-list] Installing MySQLdb for python2.7 in RHEL 6

Gabriel S. Craciun gcraciun at transfond.ro
Tue Feb 23 08:48:10 UTC 2016


Do ypu have some custom repos enabled? ...like http://rpms.famillecollet.com/enterprise/6/remi/x86_64/ ? ..where from you installed  those.remi. packages?

-----Original Message-----
From: rhelv6-list-bounces at redhat.com [mailto:rhelv6-list-bounces at redhat.com] On Behalf Of Larry Martell
Sent: 23 februarie 2016 05:18
To: rhelv6-list at redhat.com
Subject: [rhelv6-list] Installing MySQLdb for python2.7 in RHEL 6

I am trying to get django 1.9 running in RHEL 6. I have installed
python2.7 and when I try to install MySQLdb, I get the errors shown below. I have googled and googled and tried many different things, all with no success. Can anyone please let me know how I can get this going?

# /usr/local/bin/pip2.7 install MySQL-python Collecting MySQL-python
  Downloading MySQL-python-1.2.5.zip (108kB)
    100% |████████████████████████████████| 110kB 3.2MB/s Installing collected packages: MySQL-python
  Running setup.py install for MySQL-python ... error
    Complete output from command /usr/local/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-SPMNQU/MySQL-python/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-QrpP1S-record/install-record.txt
--single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
    creating build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/CR.py ->
build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/ER.py ->
build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    running build_ext
    building '_mysql' extension
    creating build/temp.linux-x86_64-2.7
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,5,'final',1)
-D__version__=1.2.5 -I/usr/include/mysql
-I/usr/local/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_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 -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1
    _mysql.c:44:23: error: my_config.h: No such file or directory
    _mysql.c:46:19: error: mysql.h: No such file or directory
    _mysql.c:47:26: error: mysqld_error.h: No such file or directory
    _mysql.c:48:20: error: errmsg.h: No such file or directory
    _mysql.c:88: error: expected specifier-qualifier-list before ‘MYSQL’
    _mysql.c:102: error: expected specifier-qualifier-list before ‘MYSQL_RES’
    _mysql.c: In function ‘_mysql_Exception’:
    _mysql.c:146: warning: implicit declaration of function ‘mysql_errno’
    _mysql.c:146: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
    _mysql.c:149: error: ‘CR_MAX_ERROR’ undeclared (first use in this function)
    _mysql.c:149: error: (Each undeclared identifier is reported only once
    _mysql.c:149: error: for each function it appears in.)
    _mysql.c:161: error: ‘CR_COMMANDS_OUT_OF_SYNC’ undeclared (first use in this function)
    _mysql.c:162: error: ‘ER_DB_CREATE_EXISTS’ undeclared (first use in this function)
    _mysql.c:163: error: ‘ER_SYNTAX_ERROR’ undeclared (first use in this function)
    _mysql.c:164: error: ‘ER_PARSE_ERROR’ undeclared (first use in this function)
    _mysql.c:165: error: ‘ER_NO_SUCH_TABLE’ undeclared (first use in this function)
    _mysql.c:166: error: ‘ER_WRONG_DB_NAME’ undeclared (first use in this function)
    _mysql.c:167: error: ‘ER_WRONG_TABLE_NAME’ undeclared (first use in this function)
    _mysql.c:168: error: ‘ER_FIELD_SPECIFIED_TWICE’ undeclared (first use in this function)
    _mysql.c:169: error: ‘ER_INVALID_GROUP_FUNC_USE’ undeclared (first use in this function)
    _mysql.c:170: error: ‘ER_UNSUPPORTED_EXTENSION’ undeclared (first use in this function)
    _mysql.c:171: error: ‘ER_TABLE_MUST_HAVE_COLUMNS’ undeclared (first use in this function)
    _mysql.c:200: error: ‘ER_DUP_ENTRY’ undeclared (first use in this function)
    _mysql.c:246: warning: implicit declaration of function ‘mysql_error’
    _mysql.c:246: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
    _mysql.c: In function ‘_mysql_server_init’:
    _mysql.c:351: warning: label ‘finish’ defined but not used
    _mysql.c:268: warning: unused variable ‘item’
    _mysql.c:267: warning: unused variable ‘groupc’
    _mysql.c:267: warning: unused variable ‘i’
    _mysql.c:267: warning: unused variable ‘cmd_argc’
    _mysql.c:266: warning: unused variable ‘s’
    _mysql.c: In function ‘_mysql_ResultObject_Initialize’:
    _mysql.c:406: error: ‘MYSQL_RES’ undeclared (first use in this function)
    _mysql.c:406: error: ‘result’ undeclared (first use in this function)
    _mysql.c:411: error: ‘MYSQL_FIELD’ undeclared (first use in this function)
    _mysql.c:411: error: ‘fields’ undeclared (first use in this function)
    _mysql.c:425: error: ‘_mysql_ResultObject’ has no member named ‘use’
    _mysql.c:428: warning: implicit declaration of function ‘mysql_use_result’
    _mysql.c:428: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
    _mysql.c:430: warning: implicit declaration of function ‘mysql_store_result’
    _mysql.c:430: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
    _mysql.c:431: error: ‘_mysql_ResultObject’ has no member named ‘result’
    _mysql.c:434: warning: implicit declaration of function ‘mysql_field_count’
    _mysql.c:434: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
    _mysql.c:438: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:442: warning: implicit declaration of function ‘mysql_num_fields’
    _mysql.c:443: error: ‘_mysql_ResultObject’ has no member named ‘nfields’
    _mysql.c:444: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:448: warning: implicit declaration of function ‘mysql_fetch_fields’
    _mysql.c:489: error: ‘BINARY_FLAG’ undeclared (first use in this function)
    _mysql.c:512: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c: In function ‘_mysql_ResultObject_traverse’:
    _mysql.c:526: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:527: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c: In function ‘_mysql_ResultObject_clear’:
    _mysql.c:538: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:538: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:538: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:538: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c:539: error: ‘_mysql_ResultObject’ has no member named ‘converter’
    _mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
    _mysql.c:551: error: ‘MYSQL’ undeclared (first use in this function)
    _mysql.c:551: error: ‘conn’ undeclared (first use in this function)
    _mysql.c:584: error: ‘_mysql_ConnectionObject’ has no member named ‘converter’
    _mysql.c:585: error: ‘_mysql_ConnectionObject’ has no member named ‘open’
    _mysql.c:636: warning: implicit declaration of function ‘mysql_init’
    _mysql.c:636: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
    _mysql.c:639: warning: implicit declaration of function ‘mysql_options’
    _mysql.c:639: error: ‘_mysql_ConnectionObject’ has no member named ‘connection’
    _mysql.c:639: error: ‘MYSQL_OPT_CONNECT_TIMEOUT’ undeclared (first use in this function

Tried installing mysql-devel, and that also failed:

# yum install mysql-devel
Loaded plugins: dellsysid, product-id, refresh-packagekit, security, subscription-manager Setting up Install Process Package mysql-devel is obsoleted by mysql-community-devel, trying to install mysql-community-devel-5.7.11-1.el6.x86_64 instead Resolving Dependencies
--> Running transaction check
---> Package mysql-community-devel.x86_64 0:5.7.11-1.el6 will be
---> installed
--> Processing Dependency: mysql-community-libs(x86-64) = 5.7.11-1.el6
for package: mysql-community-devel-5.7.11-1.el6.x86_64
--> Processing Dependency: libmysqlclient.so.20()(64bit) for package:
mysql-community-devel-5.7.11-1.el6.x86_64
--> Running transaction check
---> Package mysql-community-libs.x86_64 0:5.7.11-1.el6 will be
---> obsoleting
--> Processing Dependency: mysql-community-common(x86-64) =
5.7.11-1.el6 for package: mysql-community-libs-5.7.11-1.el6.x86_64
---> Package mysql-libs.x86_64 0:5.5.44-1.el6.remi will be obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package:
php-mysql-5.4.43-1.el6.remi.x86_64
--> Processing Dependency:
libmysqlclient.so.18(libmysqlclient_16)(64bit) for package:
php-mysql-5.4.43-1.el6.remi.x86_64
--> Processing Dependency:
libmysqlclient.so.18(libmysqlclient_18)(64bit) for package:
php-mysql-5.4.43-1.el6.remi.x86_64
--> Processing Dependency: real-mysql-libs(x86-64) = 5.5.44-1.el6.remi
for package: mysql-server-5.5.44-1.el6.remi.x86_64
--> Processing Dependency: real-mysql-libs(x86-64) = 5.5.44-1.el6.remi
for package: mysql-5.5.44-1.el6.remi.x86_64
--> Running transaction check
---> Package mysql.x86_64 0:5.5.44-1.el6.remi will be obsoleted Package
---> mysql-community-client.x86_64 0:5.7.11-1.el6 will be obsoleting
---> Package mysql-community-common.x86_64 0:5.7.11-1.el6 will be
---> installed Package mysql-community-server.x86_64 0:5.7.11-1.el6 will
---> be obsoleting Package mysql-libs.x86_64 0:5.5.44-1.el6.remi will be
---> obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package:
php-mysql-5.4.43-1.el6.remi.x86_64
--> Processing Dependency:
libmysqlclient.so.18(libmysqlclient_16)(64bit) for package:
php-mysql-5.4.43-1.el6.remi.x86_64
--> Processing Dependency:
libmysqlclient.so.18(libmysqlclient_18)(64bit) for package:
php-mysql-5.4.43-1.el6.remi.x86_64
---> Package mysql-server.x86_64 0:5.5.44-1.el6.remi will be obsoleted
--> Finished Dependency Resolution
Error: Package: php-mysql-5.4.43-1.el6.remi.x86_64 (@remi)
           Requires: libmysqlclient.so.18(libmysqlclient_16)(64bit)
           Removing: mysql-libs-5.5.44-1.el6.remi.x86_64 (@remi)
               libmysqlclient.so.18(libmysqlclient_16)(64bit)
           Obsoleted By: mysql-community-libs-5.7.11-1.el6.x86_64
(mysql57-community)
               Not found
Error: Package: php-mysql-5.4.43-1.el6.remi.x86_64 (@remi)
           Requires: libmysqlclient.so.18()(64bit)
           Removing: mysql-libs-5.5.44-1.el6.remi.x86_64 (@remi)
               libmysqlclient.so.18()(64bit)
           Obsoleted By: mysql-community-libs-5.7.11-1.el6.x86_64
(mysql57-community)
               Not found
Error: Package: php-mysql-5.4.43-1.el6.remi.x86_64 (@remi)
           Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
           Removing: mysql-libs-5.5.44-1.el6.remi.x86_64 (@remi)
               libmysqlclient.so.18(libmysqlclient_18)(64bit)
           Obsoleted By: mysql-community-libs-5.7.11-1.el6.x86_64
(mysql57-community)
               Not found
 You could try using --skip-broken to work around the problem  You could try running: rpm -Va --nofiles --nodigest

_______________________________________________
rhelv6-list mailing list
rhelv6-list at redhat.com
https://www.redhat.com/mailman/listinfo/rhelv6-list
-------------------------------- NOTICE OF CONFIDENTIALITY This E-mail message and its attachments (if any) are intended solely for the use of the addressees hereof. In addition, this message and the attachments (if any) may contain information that is confidential, privileged and exempt from disclosure under applicable law. If you are not the intended recipient of this message, you are prohibited from reading, disclosing, reproducing, distributing, disseminating or otherwise using this transmission. Delivery of this message to any person other than the intended recipient is not intended to waive any right or privilege. If you have received this message in error, please promptly notify the sender by reply E-mail and immediately delete this message from your system.




More information about the rhelv6-list mailing list