By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,526 Members | 1,618 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,526 IT Pros & Developers. It's quick & easy.

help needed :-pgdb givig error

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

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

"Ram" <rk******@gmail.com> ???????/???????? ? ???????? ?????????:
news:ma**************************************@pyth on.org...
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
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.