help needed :-pgdb givig error

R

Ram

Dear All
I am very new to python . i would appreciate any help from you all on
this problem which i am facing.

I am trying to connect to postgres from python.for this i am using
something like " import pgdb". i am able to connect to postgres and
fetch data , if i execute the python file directly in unix prompt.
However when i try to do thsi through broeser iam getting the
following error..
Traceback (most recent call last):
File "/opt/tools/cvs/htdocs/viewcvs/cgi/test.cgi", line 5, in ?
import sys,string,os,pgdb
File "/usr/local/lib/python2.3/site-packages/pgdb.py", line 62, in ?
from _pg import *
ImportError: ld.so.1: /usr/local/bin/python: fatal: libpq.so.3: open
failed: No
such file or directory
premature end of script headers...

I have python2.3 and 2.4 installed , of which pgdb.py and pg.py is installed in
/usr/local/lib/python2.3/site-packages . Please help me out how to solve this
when i give $python it is going to python 2.3.3. I also have the
shared library _pg.so in the same directory.

Luv
Ram
 
M

Maxim Kasimov

Please try to check out permisions on the library.
Perhaps there is no permissions for reading the library with uid of
web-server

"Ram" <[email protected]> ???????/???????? ? ???????? ?????????:
Dear All
I am very new to python . i would appreciate any help from you all on
this problem which i am facing.

I am trying to connect to postgres from python.for this i am using
something like " import pgdb". i am able to connect to postgres and
fetch data , if i execute the python file directly in unix prompt.
However when i try to do thsi through broeser iam getting the
following error..
Traceback (most recent call last):
File "/opt/tools/cvs/htdocs/viewcvs/cgi/test.cgi", line 5, in ?
import sys,string,os,pgdb
File "/usr/local/lib/python2.3/site-packages/pgdb.py", line 62, in ?
from _pg import *
ImportError: ld.so.1: /usr/local/bin/python: fatal: libpq.so.3: open
failed: No
such file or directory
premature end of script headers...

I have python2.3 and 2.4 installed , of which pgdb.py and pg.py is
installed in
/usr/local/lib/python2.3/site-packages . Please help me out how to solve
this
when i give $python it is going to python 2.3.3. I also have the
shared library _pg.so in the same directory.

Luv
Ram
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top