Re: FW: segfault on psycopg2 on CentOS - Mailing list psycopg

From Daniele Varrazzo
Subject Re: FW: segfault on psycopg2 on CentOS
Date
Msg-id CA+mi_8YGKQJRxTYWuDMgOM7CYF+6WDo1nQQ6a0PycFBgMUoBAw@mail.gmail.com
Whole thread Raw
In response to Re: FW: segfault on psycopg2 on CentOS  (Ed Davison <EDavison@getmns.com>)
List psycopg
On Wed, Mar 11, 2015 at 2:47 PM, Ed Davison <EDavison@getmns.com> wrote:

>> # trying
>> /opt/python2.7.8/lib/python2.7/site-packages/psycopg2/_psycopg.so
>> dlopen("/opt/python2.7.8/lib/python2.7/site-packages/psycopg2/_psycopg
>> .so", 2); Segmentation fault
>>
>> I have tested this with python2.7 to just simply load the psycopg2 library with the import statement and just
loadingthe library causes a segfault as earlier stated in my backtrace. 
>
> To follow up on Danieles comment:
>
> 1) Are you running in a virtualenv?
> No, I am not.
>
> 2) Do you have more than one installation of Python?
> Yes, I have python 2.7.8 and python 2.4.3.  Running on CentOS 5.9 there is no package for upgrading the main and only
versionto anything newer. 
>
> 3) More to the point what does python2.7 point to?
> # ls -al /usr/bin/python2.7
> lrwxrwxrwx 1 root root 30 Nov 10 15:55 /usr/bin/python2.7 -> /opt/python2.7.8/bin/python2.7

This is a bit messed up. Either your Python environment is
inconsistent or it is WRT when psycopg was compiled. If you wanted to
investigate further maybe an "ldd /path/to/_psycopg.so" would suggest
you something.

What you may try to do is to create a virtualenv and pip install
psycopg2 into it, which would compile a fresh copy.

-- Daniele


psycopg by date:

Previous
From: Ed Davison
Date:
Subject: Re: segfault on psycopg2 on CentOS
Next
From: Adrian Klaver
Date:
Subject: Re: segfault on psycopg2 on CentOS