| PostgreSQL Reference Manual - Volume 3 - Server Administration Guide by The PostgreSQL Global Development Group Paperback (6"x9"), 204 pages ISBN 0954612043 RRP £13.95 ($24.95) Sales of this book support the PostgreSQL project! Get a printed copy>>> |
1.6.1 Shared Libraries
On some systems that have shared libraries (which most systems do)
you need to tell your system how to find the newly installed
shared libraries. The systems on which this is
not necessary include BSD/OS, FreeBSD,
HP-UX, IRIX, Linux,
NetBSD, OpenBSD, Tru64
UNIX (formerly Digital UNIX), and
Solaris.
The method to set the shared library search path varies between
platforms, but the most widely usable method is to set the
environment variable LD_LIBRARY_PATH like so: In Bourne
shells (sh, ksh, bash, zsh)
LD_LIBRARY_PATH=/usr/local/pgsql/lib export LD_LIBRARY_PATH
or in csh or tcsh
setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
Replace /usr/local/pgsql/lib with whatever you set
to in section 1.5 Installation Procedure.
You should put these commands into a shell start-up file such as
‘/etc/profile’ or ‘~/.bash_profile’. Some
good information about the caveats associated with this method can
be found at http://www.visi.com/~barr/ldpath.html.
--libdir
On some systems it might be preferable to set the environment
variable LD_RUN_PATH before
building.
On Cygwin, put the library
directory in the PATH or move the
‘.dll’ files into the ‘bin’
directory.
If in doubt, refer to the manual pages of your system (perhaps
ld.so or rld). If you later
on get a message like
psql: error in loading shared libraries libpq.so.2.1: cannot open shared object file: No such file or directory
then this step was necessary. Simply take care of it then.
If you are on BSD/OS, Linux, or SunOS 4
and you have root access you can run
/sbin/ldconfig /usr/local/pgsql/lib
(or equivalent directory) after installation to enable the
run-time linker to find the shared libraries faster. Refer to the
manual page of ldconfig for more information. On
FreeBSD, NetBSD, and OpenBSD the command is
/sbin/ldconfig -m /usr/local/pgsql/lib
instead. Other systems are not known to have an equivalent command.
| ISBN 0954612043 | PostgreSQL Reference Manual - Volume 3 - Server Administration Guide | See the print edition |