Skip to content

Cannot install version 1.4.5 in CentOS 6 #396

Closed
@jmrbcu

Description

@jmrbcu

I tried to install mysqlclient under CentOS 6 using python 2.7 and pip but it fails, version 1.4.4 works fine, here is the output:

pip install mysqlclient==1.4.5

Collecting mysqlclient==1.4.5
  Using cached https://files.pythonhosted.org/packages/f8/9b/5db9a03e2088a87c26e3e4d4c7f7e8f4c2dbae610f9521cdfac15755a795/mysqlclient-1.4.5.tar.gz
Building wheels for collected packages: mysqlclient
  Building wheel for mysqlclient (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/totaltrack/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-SqpdBJ/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-SqpdBJ/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-EY1a8w --python-tag cp27
       cwd: /tmp/pip-install-SqpdBJ/mysqlclient/
  Complete output (48 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating 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/_exceptions.py -> build/lib.linux-x86_64-2.7/MySQLdb
  copying MySQLdb/compat.py -> build/lib.linux-x86_64-2.7/MySQLdb
  copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
  copying MySQLdb/converters.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/CLIENT.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/ER.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/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
  running build_ext
  building 'MySQLdb._mysql' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/MySQLdb
  gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,4,5,'final',0) -D__version__=1.4.5 -I/usr/include/mysql -I/usr/local/totaltrack/include/python2.7 -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-2.7/MySQLdb/_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
  In file included from /usr/local/totaltrack/include/python2.7/Python.h:8,
                   from MySQLdb/_mysql.c:38:
  /usr/local/totaltrack/include/python2.7/pyconfig.h:1220:1: warning: "_POSIX_C_SOURCE" redefined
  In file included from /usr/include/sys/types.h:26,
                   from /usr/include/mysql/mysql.h:50,
                   from MySQLdb/_mysql.c:29:
  /usr/include/features.h:162:1: warning: this is the location of the previous definition
  In file included from /usr/local/totaltrack/include/python2.7/Python.h:8,
                   from MySQLdb/_mysql.c:38:
  /usr/local/totaltrack/include/python2.7/pyconfig.h:1242:1: warning: "_XOPEN_SOURCE" redefined
  In file included from /usr/include/sys/types.h:26,
                   from /usr/include/mysql/mysql.h:50,
                   from MySQLdb/_mysql.c:29:
  /usr/include/features.h:164:1: warning: this is the location of the previous definition
  MySQLdb/_mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
  MySQLdb/_mysql.c:498: error: ‘MYSQL_DEFAULT_AUTH’ undeclared (first use in this function)
  MySQLdb/_mysql.c:498: error: (Each undeclared identifier is reported only once
  MySQLdb/_mysql.c:498: error: for each function it appears in.)
  MySQLdb/_mysql.c: In function ‘_mysql_field_to_python’:
  MySQLdb/_mysql.c:1142: warning: passing argument 1 of ‘PyInt_FromString’ discards qualifiers from pointer target type
  /usr/local/totaltrack/include/python2.7/intobject.h:37: note: expected ‘char *’ but argument is of type ‘const char *’
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
  Found existing installation: mysqlclient 1.4.4
    Uninstalling mysqlclient-1.4.4:
      Successfully uninstalled mysqlclient-1.4.4
    Running setup.py install for mysqlclient ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/totaltrack/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-SqpdBJ/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-SqpdBJ/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4rxZDR/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-SqpdBJ/mysqlclient/
    Complete output (48 lines):
    running install
    running build
    running build_py
    creating build
    creating 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/_exceptions.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/compat.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
    copying MySQLdb/converters.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/CLIENT.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/ER.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/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
    running build_ext
    building 'MySQLdb._mysql' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/MySQLdb
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,4,5,'final',0) -D__version__=1.4.5 -I/usr/include/mysql -I/usr/local/totaltrack/include/python2.7 -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-2.7/MySQLdb/_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
    In file included from /usr/local/totaltrack/include/python2.7/Python.h:8,
                     from MySQLdb/_mysql.c:38:
    /usr/local/totaltrack/include/python2.7/pyconfig.h:1220:1: warning: "_POSIX_C_SOURCE" redefined
    In file included from /usr/include/sys/types.h:26,
                     from /usr/include/mysql/mysql.h:50,
                     from MySQLdb/_mysql.c:29:
    /usr/include/features.h:162:1: warning: this is the location of the previous definition
    In file included from /usr/local/totaltrack/include/python2.7/Python.h:8,
                     from MySQLdb/_mysql.c:38:
    /usr/local/totaltrack/include/python2.7/pyconfig.h:1242:1: warning: "_XOPEN_SOURCE" redefined
    In file included from /usr/include/sys/types.h:26,
                     from /usr/include/mysql/mysql.h:50,
                     from MySQLdb/_mysql.c:29:
    /usr/include/features.h:164:1: warning: this is the location of the previous definition
    MySQLdb/_mysql.c: In function ‘_mysql_ConnectionObject_Initialize’:
    MySQLdb/_mysql.c:498: error: ‘MYSQL_DEFAULT_AUTH’ undeclared (first use in this function)
    MySQLdb/_mysql.c:498: error: (Each undeclared identifier is reported only once
    MySQLdb/_mysql.c:498: error: for each function it appears in.)
    MySQLdb/_mysql.c: In function ‘_mysql_field_to_python’:
    MySQLdb/_mysql.c:1142: warning: passing argument 1 of ‘PyInt_FromString’ discards qualifiers from pointer target type
    /usr/local/totaltrack/include/python2.7/intobject.h:37: note: expected ‘char *’ but argument is of type ‘const char *’
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
  Rolling back uninstall of mysqlclient
  Moving to /usr/local/totaltrack/lib/python2.7/site-packages/MySQLdb/
   from /usr/local/totaltrack/lib/python2.7/site-packages/~ySQLdb
  Moving to /usr/local/totaltrack/lib/python2.7/site-packages/mysqlclient-1.4.4.dist-info/
   from /usr/local/totaltrack/lib/python2.7/site-packages/~ysqlclient-1.4.4.dist-info
ERROR: Command errored out with exit status 1: /usr/local/totaltrack/bin/python2.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-SqpdBJ/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-SqpdBJ/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4rxZDR/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions