Re: error while loading shared libraries: libpq.so.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux