Thursday, December 20, 2007

Library Path Variables

If some Unix application is crashing because it did not find some dependant library, you need to add the path of library file to standary library search path for Unix.

If /usr/foo/bar is the lcoation where you have the dependant library file available, then this is how you can add it to standard library for different OS's (assumming you are in bash shell):

Solaris & Linux:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/foo/bar

Aix:
export LIBPATH=$LIBPATH:/usr/foo/bar

HPUX:
export SHLIB_PATH=$SHLIB_PATH:/usr/foo/bar

No comments: