LD_LIBRARY_PATH

Charles Farinella cfarinella at appropriatesolutions.com
Thu Mar 29 14:45:02 UTC 2007


Josh Carroll wrote:
>> New to FreeBSD.  How can I update my LD_LIBRARY_PATH?

> There are a couple of ways. First, you can look at
> /etc/defaults/rc.conf for the default value of ldconfig_paths. On this
> 6.2-RELEASE system, it's set to:
> 
> ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib
> /usr/local/lib/compat/pkg"
> 
> So you can edit /etc/rc.conf and append to that list. E.g. if you
> wanted to add /usr/local/my_libs, you'd put the following in
> /etc/rc.conf:
> 
> ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib
> /usr/local/lib/compat/pkg /usr/local/my_libs"
> 
> Another possibility, based on a cursory read of /etc/rc.d/ldconfig,
> would be to add the path to /etc/ld-elf.so.conf (which probably
> doesn't exist by default).
> 
> Either way, once you've added your path, you'd run:
> 
> /etc/rc.d/ldconfig start
> 
> Which should add the libraries from the added path.

Thanks so much for your reply, I was not aware of /etc/defaults or it's 
contents.  Now I know.  :-)

I was able to correct my issue yesterday with 'ldconfig -m 
/path/to/libs' which adds the path to /var/run/ld-elf.so.hints.

thanks again.

--charlie

-- 
------------------------------------------------------------------------
Charles Farinella
Appropriate Solutions, Inc. (www.AppropriateSolutions.com)
cfarinella at AppropriateSolutions.com
voice: 603.924.6079   fax: 603.924.8668



More information about the freebsd-questions mailing list