You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by James McManus <jm...@yahoo.com> on 2007/02/08 02:44:36 UTC
[users@httpd] error while loading shared libraries: libpq.so.5
Hi - How do I set library path for httpd server on fedora core 6? I am
trying to run a program (mapserv) through cgi-bin. I am getting the
following error message:
error while loading shared libraries: libpq.so.5
This file is located in /usr/local/pgsql/lib
To run mapserv from shell, I set LD_LIBRARY_PATH, in my .bashrc file
(bad habit). How do I make similar setting so that it will run under
cgi-bin?
Thanks
Jim
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] error while loading shared libraries: libpq.so.5
Posted by Steve Feehan <sf...@boolecat.com>.
On Wed, Feb 07, 2007 at 08:44:36PM -0500, James McManus wrote:
> Hi - How do I set library path for httpd server on fedora core 6? I am
> trying to run a program (mapserv) through cgi-bin. I am getting the
> following error message:
>
> error while loading shared libraries: libpq.so.5
>
> This file is located in /usr/local/pgsql/lib
>
> To run mapserv from shell, I set LD_LIBRARY_PATH, in my .bashrc file
> (bad habit). How do I make similar setting so that it will run under
> cgi-bin?
A couple options:
1. Add the directory to /etc/ld.so.conf and update the cache by
running ldconfig.
2. Create a wrapper that calls the actual binary. Put the
LD_LIBRARY_PATH in the wrapper. For example:
#!/bin/sh
LD_LIBRARY_PATH=/usr/local/pgsql/lib exec /path/to/actual/cgi/binary
3. Link the program with /usr/local/pgsql/lib in the runtime
library search path. See the ld(1) man page for the -rpath option.
Also, see the gcc(1) man page for passing arguments to ld
(specifically, the -Wl option):
gcc -Wl,-rpath,/usr/local/pgsql/lib ... etc ...
Maybe others I'm not thinking of?
--
Steve Feehan
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org