location of ld.so.conf file on Ubuntu 5.10

Alan McKinnon alan at linuxholdings.co.za
Thu Mar 30 22:15:19 UTC 2006

On Thursday 30 March 2006 21:31, zojas wrote:
> ok, so the standard ubuntu setup is to simply let ldconfig find all
> the libraries in /lib and /usr/lib? the reason I was thinking it
> would be more than that is in other distros, I've seen complicated
> setups where you can add entries in /etc/ (in files other than
> ld.so.conf) and then run a script which builds an ld.so.conf

Gentoo does it that way. Newly installed packages with unusual lib 
locations write a new file in /etc/env.d which gets processed by a 
script to create a new /etc/conf.d. Then ldconfig runs after every 
install. It leads to a lot of redundancy. Here's mine:

develop ubuntu # cat /etc/ld.so.conf
# ld.so.conf autogenerated by env-update; make all changes to
# contents of /etc/env.d directory
/usr/local/lib                                       *
/usr/i686-pc-linux-gnu/lib                           *
/opt/sun-jdk-                  *
/opt/sun-jdk-   *
/opt/sun-jdk-           *
/opt/sun-jdk-           *
/usr/qt/3/lib                                        *
/usr/kde/3.5/lib                                     *
/usr/games/lib                                       *

Only those marked * are really needed as /lib and /usr/lib are 
processed recursively by ldconfig anyway. Gentoo also follows the KDE 
and Qt convention (strictly speaking contrary to FHS) of putting 
everything in those packages in /usr/kde|qt/<version number>, to 
allow users to have more than once version of KDE on the system. 
Gentoo encourages lots of compiling :-) so /usr/local/lib is 
required. Any /opt/* must be there too.

In contrast, Ubuntu is a binary distro and complies with the very sane 
FHS. Gnome libs are in /usr/lib/gnome, game libs are 
in /usr/lib/games. Ubuntu users don't have two versions of Gnome at 
one time, they just upgrade and downgrade one by one. Most Ubuntu 
users don't compile their own stuff so /usr/local stays empty, and 
my /opt has nothing in it.

Short version: ldconfig's default suits Ubuntu just fine

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five

More information about the ubuntu-users mailing list