environment: Ubuntu 10.04 LTS
build Python 2.7.2 with ./configure --with-zlib --enable-unicode=ucs4
postgresql-9.0
wsgi
Django 1.3
virtualenv
apache
I am trying to build Ubuntu Django App Server. The installation completed with no error message. The exact installation method was successful with Ubuntu 11.04.
However, when installation is completed on Ubuntu 10.04 and try to load psycopg2
from Django, I got the following error (I did not get this error on 11.04):
File "/home/nreeves/venv/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 24, in <module>
raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
ImproperlyConfigured: Error loading psycopg2 module: /home/nreeves/venv/lib/python2.7/site-packages/psycopg2/_psycopg.so: undefined symbol: _PyObject_NextNotImplemented
My guess is that some linkage to library is incorrect... but I have no idea where to start... I have a following output - not sure if this will help you help me...
$ ldd /home/nreeves/venv/lib/python2.7/site-packages/psycopg2/_psycopg.so
linux-gate.so.1 => (0xb77da000)
libpq.so.5 => /usr/lib/libpq.so.5 (0xb7788000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb776f000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7614000)
libssl.so.0.9.8 => /lib/i686/cmov/libssl.so.0.9.8 (0xb75cc000)
libcrypto.so.0.9.8 => /lib/i686/cmov/libcrypto.so.0.9.8 (0xb747a000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb73c9000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0xb73c5000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xb7395000)
libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0xb734e000)
/lib/ld-linux.so.2 (0xb77db000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb734a000)
libz.so.1 => /lib/libz.so.1 (0xb7335000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb7311000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0xb7308000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0xb7304000)
libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb72f0000)
liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0xb72e3000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb72cb000)
libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0xb722f000)
libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb721e000)
libgcrypt.so.11 => /lib/libgcrypt.so.11 (0xb71ab000)
libgpg-error.so.0 => /lib/libgpg-error.so.0 (0xb71a6000)
And the following command outputs:
$ ls -l /usr/lib/libpq*
-rw-r--r-- 1 root root 224904 2011-09-26 06:33 /usr/lib/libpq.a
lrwxrwxrwx 1 root root 12 2011-09-26 10:51 /usr/lib/libpq.so -> libpq.so.5.4
lrwxrwxrwx 1 root root 12 2011-09-26 10:51 /usr/lib/libpq.so.5 -> libpq.so.5.4
-rw-r--r-- 1 root root 150976 2011-09-26 06:33 /usr/lib/libpq.so.5.4
To me it appears that all is correct. Any advice would be appreciated.