ldconfig(8)

TOC   Previous   Next

ldconfig(8) (cont.)

Example - installing two different major versions of a library.

We copy both versions into /usr/lib:

# mv libdemo.so.1.0.1 libdemo.so.2.0.1 /usr/lib
# cd /usr/lib

We run ldconfig to update the dynamic linker cache:

# ldconfig -v | grep libdemo      
        libdemo.so.1 -> libdemo.so.1.0.1 (changed)
        libdemo.so.2 -> libdemo.so.2.0.1 (changed)

Then we manually create the linker name:

# ln -s libdemo.so.2 libdemo.so


To install a new 2.x minor version:

# mv libdemo.so.2.0.2 /usr/lib
# cd /usr/lib
# ldconfig -v | grep libdemo       
        libdemo.so.1 -> libdemo.so.1.0.1
        libdemo.so.2 -> libdemo.so.2.0.2 (changed)

The ldconfig command effectively also updates linker name...


(C) 2006, Michael Kerrisk