ImportError with libpq.so.2
"Todd Reed" <[email protected]>
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Organization | Kojents Inc. |
| Message-ID | <005b01c2e1dc$e3c68c50$6501a8c0@quux> |
I had PostgreSQL 7.21 and pyPgSQL 2.2 installed and working on a RedHat 7.3
installation. After upgrading to PostgreSQL 7.3.2, my scripts generated an
ImportError as shown below:
Traceback (most recent call last):
File
"/home/autoprocess/Developer/Source/Applications/Sales/FetchEmail.py", line
3, in ?
from pyPgSQL import PgSQL as DBModule
File "/usr/lib/python2.2/site-packages/pyPgSQL/PgSQL.py", line 356, in ?
from libpq import *
File "/usr/lib/python2.2/site-packages/pyPgSQL/libpq/__init__.py", line
23, in ?
from libpq import *
ImportError: libpq.so.2: cannot open shared object file: No such file or
directory
I upgraded to pyPgSQL 2.3 by installing the RPM from SourceForge, but the
above error persisted.
I found a copy libqp.so.2 in /usr/lib/pgsql/backup, and copied it to
/usr/lib. After that, I received the following error:
Traceback (most recent call last):
File
"/home/autoprocess/Developer/Source/Applications/Sales/FetchEmail.py", line
3, in ?
from pyPgSQL import PgSQL as DBModule
File "/usr/lib/python2.2/site-packages/pyPgSQL/PgSQL.py", line 349, in ?
from libpq import *
File "/usr/lib/python2.2/site-packages/pyPgSQL/libpq/__init__.py", line
23, in ?
from libpq import *
ImportError: /usr/lib/python2.2/site-packages/pyPgSQL/libpq/libpqmodule.so:
undefined symbol: PyUnicodeUCS4_EncodeDecimal
Any suggestions on fixing this problem?
--
Todd Reed
[email protected]
Kojents Inc.
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com