httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Steve Feehan)
Subject Re: [users@httpd] error while loading shared libraries:
Date Thu, 08 Feb 2007 02:22:57 GMT
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:
> 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/ 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:


    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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message