[root@ elf]# ldconfig -p
939 libs found in cache `/etc/ld.so.cache'
libz.so.1 (libc6,x86-64) => /usr/lib64/libz.so.1
libz.so.1 (libc6) => /usr/lib/libz.so.1
libz.so (libc6,x86-64) => /usr/lib64/libz.so
What does it mean?
[root@ elf]# ldconfig -p
939 libs found in cache `/etc/ld.so.cache'
libz.so.1 (libc6,x86-64) => /usr/lib64/libz.so.1
libz.so.1 (libc6) => /usr/lib/libz.so.1
libz.so (libc6,x86-64) => /usr/lib64/libz.so
What does it mean?
It just shows which libraries the dynamic linker keeps it in cache and where to find them. This is done so that programs can find libraries they need independent of where they are stored and to reduce start times for programs, because they don't need to be searched at startup, just looked up in the cache and loaded.
In the case of
libz.so.1
, there are two variants available, one in 64bit and one in 32bit, and programs will just ask for the variant they need at startup and get pointed to the right file.Lastly, the differentiation between
libz.so
andlibz.so.1
makes it possible to keep older variants of a library around for programs that need them. This way, programs can ask for just any variant (libfoo.so
), a specific version (libfoo.13.2
) or some limits on the version.