ImportError: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib/libpq.so.5)

cppnoob picture cppnoob · May 30, 2016 · Viewed 19.6k times · Source

I have to run a tornado webapp on a server using psycopg2 with postgresql as backend. I am working on Red Hat Enterprise Linux Server release 6.5. I set up a virtual environment. Now, on this server, i don't have root access, i can't use pip or yum and i can't copy text from the server(so i can't post the exact error log). I have been manually downloading tar files for the libraries and installing them. When i try to run the webapp, i get the following error:

ImportError: /lib/libc.so.6: version `GLIBC_2.14' not found (required by /usr/lib/libpq.so.5)

The version for libc.so.6 is 2.12. The error is displayed in psycopg2/init.py.

I apologize as this is not much to go on, but the server has a lot of restrictions. Any help will be appreciated.

Answer

Employed Russian picture Employed Russian · May 31, 2016

This error:

ImportError: /lib/libc.so.6: version `GLIBC_2.14' not found \
  (required by /usr/lib/libpq.so.5)

means that libpq.so.5 was built on a system with GLIBC-2.14 or above.

Since you claim to not have root privilege on this system, and since /usr/lib is not writable by regular users, we must assume that you've asked the sysadmin on this system to install something for you, and the sysadmin installed a non-working PostgreSQL package.

There is no easy way you can fix this problem yourself.

You should work with your sysadmin to install correct packages for your system.

Alternatively, you can build install and use a newer version of GLIBC in non-default location. This is quite non-trivial. Some details here.