2

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.

Ben Darnell
  • 21,844
  • 3
  • 29
  • 50
cppnoob
  • 129
  • 1
  • 4
  • 12

1 Answers1

5

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.

Community
  • 1
  • 1
Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • i have installed PostgrSQL and other libraries on a separate location, using a virtual environment and exporting LD_LIBRARY_PATH to that location, still getting the same error. Would it be better to upgrade the GLIBC-2.14 on that location or look for a compatible PostgreSQL version? – cppnoob May 31 '16 at 03:26
  • @cppnoob If you can install GIBC-2.14 in your virtual environment, that would be the easiest path to take. – Employed Russian May 31 '16 at 04:00
  • I tried to install GLIBC-2.14, but the server ran out of space during 'make'(I only have 450 MB available on the server and at the beginning i only occupied 100 MB). I tried to install Redhat compatible PostgreSQL, but i could only find RPMs which need root access, if i am not mistaken. Is there any other alternative, or am i doing something wrong? – cppnoob May 31 '16 at 10:34
  • I changed the PostgreSQL version and it worked. Thank you for your help – cppnoob May 31 '16 at 12:34