Hi all,
I am deploying my Django app in sage-5.2-Ubuntu-10.04 on a Debian Wheezy.
Almost all succeeds but I need python psycopg2 in sage environment and I cannot make it working. My problem is verified when I import psycopg2:
#
ImportError: /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: symbol gnutls_certificate_get_x509_cas, version GNUTLS_1_4 not defined in file libgnutls.so.26 with link time reference
#
The symbol gnutls_certificate_get_x509_ca
seems to be in /usr/lib/x86_64-linux-gnu/libgnutls.so.26
but not in /opt/sage-5.2-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/libgnutls.so.26
that is checked because of the LD_LIBRARY_PATH
setting.
Follow the story on how to reproduce it
sage -sh
esay_install --upgrade psycopg2
First error:
Processing psycopg2-2.4.5.tar.gz
Running psycopg2-2.4.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Vhfq2Z/psycopg2-2.4.5/egg-dist-tmp-sajtkC
no previously-included directories found matching 'doc/src/_build'
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1
Following http://stackoverflow.com/questions/6329887/compiling-problems-cannot-find-crt1-o and I have done:
ln -s /usr/lib/x86_64-linux-gnu /usr/lib64
esay_install --upgrade psycopg2
Installed. WOW! BUT...
python
Python 2.7.3 (default, Jul 27 2012, 03:29:26)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/sage-5.2-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python2.7/site-packages/psycopg2-2.4.5-py2.7-linux-x86_64.egg/psycopg2/__init__.py", line 67, in <module>
from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2: symbol gnutls_certificate_get_x509_cas, version GNUTLS_1_4 not defined in file libgnutls.so.26 with link time reference
I cannot find out the way to get out of this problem, please help me if you can.
Thank you very much Luca