1

Trying to run a Python script that imports MySQLdb. I've ran yum update libgcrypt.

Traceback (most recent call last):
  File "/var/www/python/ig/ig-post.py", line 12, in <module>
    import MySQLdb
  File "/usr/local/lib/python2.7/site-packages/MySQLdb/__init__.py", line 19, in <module>
    import _mysql
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/user/.linuxbrew/lib/libcrypt.so.1)

Also maybe helpful:

# yum info libgcrypt
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.ircam.fr
 * epel: mirrors.ircam.fr
 * extras: centos.mirror.fr.planethoster.net
 * updates: centos.quelquesmots.fr
Installed Packages
Name        : libgcrypt
Arch        : x86_64
Version     : 1.4.5
Release     : 12.el6_8
Size        : 524 k
Repo        : installed
From repo   : base
Summary     : A general-purpose cryptography library
URL         : http://www.gnupg.org/
License     : LGPLv2+
Description : Libgcrypt is a general purpose crypto library based on the code used
            : in GNU Privacy Guard.  This is a development version.

Available Packages
Name        : libgcrypt
Arch        : i686
Version     : 1.4.5
Release     : 12.el6_8
Size        : 228 k
Repo        : base
Summary     : A general-purpose cryptography library
URL         : http://www.gnupg.org/
License     : LGPLv2+
Description : Libgcrypt is a general purpose crypto library based on the code used
            : in GNU Privacy Guard.  This is a development version.
User
  • 23,729
  • 38
  • 124
  • 207
  • Possible duplicate of [Compile with older libc (version \`GLIBC\_2.14' not found)](https://stackoverflow.com/questions/10815453/compile-with-older-libc-version-glibc-2-14-not-found) – Employed Russian Nov 21 '17 at 16:42
  • @EmployedRussian That question is different, given that it says what he did wrong, but it doesn't say what to do to actually fix it. – User Nov 21 '17 at 18:32

1 Answers1

0

You have a locally-built /home/user/.linuxbrew/lib/libcrypt.so.1 which has been built on a system with GLIBC-2.14 (or newer).

That library is incompatible with the system you are trying to run on (which has GLIBC-2.13 or older).

You need to either remove /home/user/.linuxbrew/lib from your LD_LIBRARY_PATH (or whatever mechanism you use to pick it up), or remove /home/user/.linuxbrew/lib/libcrypt.so.1 altogether.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362