Configuring Dynamic Loader
By default, the dynamic loader
(/lib/ld-linux.so.2) searches through /lib and /usr/lib for dynamic libraries that are needed
by programs when you run them. However, if there are libraries in
directories other than /lib and
/usr/lib, you need to add them to
the /etc/ld.so.conf file for the dynamic
loader to find them. Two directories that are commonly known to contain
additional libraries are /usr/local/lib and /opt/lib, so we add those directories to the
dynamic loader's search path.
Create a new file /etc/ld.so.conf by running the
following:
cat > /etc/ld.so.conf << "EOF"
# Begin /etc/ld.so.conf
/usr/local/lib
/opt/lib
# End /etc/ld.so.conf
EOF