Thanks for the tip. I will try this.
The current location of libpq.so.5 is /opt/Postgres/9.0/lib/

-vivek

On Monday, July 23, 2012 6:31:08 AM UTC-7, Graham Dumpleton wrote:
>
> On 23 July 2012 00:43, Vivek Tawde <[email protected]> wrote: 
> > Hi, 
> > I am trying to import pysopg2 module within wsgi script in embedded 
> mode. 
> > The script throws an exception in the httpd log: 
> > File "/usr/local/lib/python2.6/site-packages/psycopg2/__init__.py", line 
> 67, 
> > in <module> 
> > from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID 
> > ImportError: libpq.so.5: cannot open shared object file: No such file or 
> > directory 
> > 
> > I checked the permissions on the on the postgres library path and it 
> seems 
> > correct. Any clues about this issue? 
>
> Presuming they are actually installed, sounds like your PostgreSQL 
> libraries are installed in a non standard location. 
>
> Were you relying on a LD_LIBRARY_PATH environment variable in your 
> user environment to find the libraries? This will not be picked up by 
> Apache. 
>
> If your PostgreSQL libraries are installed in a non standard location 
> and you can't have them installed in a directory on standard system 
> library search path, then when building the Python client module for 
> PostgreSQL, set LD_RUN_PATH temporarily to include the directory where 
> the libraries will be installed. That way the directory will embedded 
> in the psycopg2 extension module and will automatically know where to 
> get libraries from at run time without needing LD_LIBRARY_PATH. 
>
> So, where is libpq.so installed? 
>
> Graham 
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/modwsgi/-/UzrDDne9M0cJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to