Thread: [psycopg] _psycopg.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ASN1_STRING_length
[psycopg] _psycopg.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ASN1_STRING_length
From
Allan Kamau
Date:
OS=CentOS Linux release 7.3.1611 (Core)
gcc=gcc version 6.4.0 (GCC)
python=3.6.3
postgreSQL=10.0
psycopg2=2.7.3.1
I am trying to build and install psycopg2 from source to a python 3.6.3 installation that has also been built and installed from source.
The "--pg-config" parameter points to PostgreSQL version 10.0 that I installed from source.
The compilation and installation seems to complete successfully but the error below is thrown when I try importing psycopg2.
[me@here 2017/10/18 16:59:51 +03]$ date;time /somepath/apps/python/3.6.3/bin/python3 -c"import psycopg2;";date;
Wed Oct 18 16:59:52 +03 2017
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/somepath/apps/python/3.6.3/lib/python3.6/site-packages/psycopg2-2.7.3.1-py3.6-linux-x86_64.egg/psycopg2/__init__.py", line 50, in <module>
from psycopg2._psycopg import ( # noqa
ImportError: /somepath/apps/python/3.6.3/lib/python3.6/site-packages/psycopg2-2.7.3.1-py3.6-linux-x86_64.egg/psycopg2/_psycopg.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ASN1_STRING_length
real 0m0.046s
user 0m0.024s
sys 0m0.009s
Wed Oct 18 16:59:52 +03 2017
[me@here 2017/10/18 16:59:52 +03]$
[me@here 2017/10/18 17:01:34 +03]$
Below are the commands I used in compiling and installing psycopy2.
export pg_home=/home/me/apps/postgreSQL/pgsql-10.0;
export PATH=${pg_home}/bin/:${PATH};
export LD_LIBRARY_PATH=${pg_home}/lib:${LD_LIBRARY_PATH};
date;time /somepath/apps/python/3.6.3/bin/python3 setup.py build_ext --pg-config ${pg_home}/bin/pg_config --static-libpq --library-dirs ${pg_home}/lib --include-dirs ${pg_home}/include build;date;
date;time /somepath/apps/python/3.6.3/bin/python3 setup.py build_ext --pg-config ${pg_home}/bin/pg_config --static-libpq --library-dirs ${pg_home}/lib --include-dirs ${pg_home}/include install;date;
date;time /somepath/apps/python/3.6.3/bin/python3 -c"import psycopg2;";date;
Allan.gcc=gcc version 6.4.0 (GCC)
python=3.6.3
postgreSQL=10.0
psycopg2=2.7.3.1
I am trying to build and install psycopg2 from source to a python 3.6.3 installation that has also been built and installed from source.
The "--pg-config" parameter points to PostgreSQL version 10.0 that I installed from source.
The compilation and installation seems to complete successfully but the error below is thrown when I try importing psycopg2.
[me@here 2017/10/18 16:59:51 +03]$ date;time /somepath/apps/python/3.6.3/bin/python3 -c"import psycopg2;";date;
Wed Oct 18 16:59:52 +03 2017
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/somepath/apps/python/3.6.3/lib/python3.6/site-packages/psycopg2-2.7.3.1-py3.6-linux-x86_64.egg/psycopg2/__init__.py", line 50, in <module>
from psycopg2._psycopg import ( # noqa
ImportError: /somepath/apps/python/3.6.3/lib/python3.6/site-packages/psycopg2-2.7.3.1-py3.6-linux-x86_64.egg/psycopg2/_psycopg.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ASN1_STRING_length
real 0m0.046s
user 0m0.024s
sys 0m0.009s
Wed Oct 18 16:59:52 +03 2017
[me@here 2017/10/18 16:59:52 +03]$
[me@here 2017/10/18 17:01:34 +03]$
Below are the commands I used in compiling and installing psycopy2.
export pg_home=/home/me/apps/postgreSQL/pgsql-10.0;
export PATH=${pg_home}/bin/:${PATH};
export LD_LIBRARY_PATH=${pg_home}/lib:${LD_LIBRARY_PATH};
date;time /somepath/apps/python/3.6.3/bin/python3 setup.py build_ext --pg-config ${pg_home}/bin/pg_config --static-libpq --library-dirs ${pg_home}/lib --include-dirs ${pg_home}/include build;date;
date;time /somepath/apps/python/3.6.3/bin/python3 setup.py build_ext --pg-config ${pg_home}/bin/pg_config --static-libpq --library-dirs ${pg_home}/lib --include-dirs ${pg_home}/include install;date;
date;time /somepath/apps/python/3.6.3/bin/python3 -c"import psycopg2;";date;
Re: [psycopg] _psycopg.cpython-36m-x86_64-linux-gnu.so: undefinedsymbol: ASN1_STRING_length
From
Daniele Varrazzo
Date:
On Wed, Oct 18, 2017 at 3:10 PM, Allan Kamau <kamauallan@gmail.com> wrote: > /somepath/apps/python/3.6.3/lib/python3.6/site-packages/psycopg2-2.7.3.1-py3.6-linux-x86_64.egg/psycopg2/_psycopg.cpython-36m-x86_64-linux-gnu.so: > undefined symbol: ASN1_STRING_length Smells like something wrong with libssl. > --pg-config ${pg_home}/bin/pg_config --static-libpq --library-dirs > ${pg_home}/lib --include-dirs ${pg_home}/include build;date; > date;time /somepath/apps/python/3.6.3/bin/python3 setup.py build_ext I don't think --static-libpq has been tested in a long while. -- Daniele -- Sent via psycopg mailing list (psycopg@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/psycopg