What do the number suffixes in Linux dynamic libraries mean?

Here's an example:

~$ ls /lib/*.so* | head -n 10
/lib/ld-2.13.so
/lib/ld-Linux.so.2
/lib/libacl.so
/lib/libacl.so.1
/lib/libacl.so.1.1.0
/lib/libanl-2.13.so
/lib/libanl.so.1
/lib/libattr.so
/lib/libattr.so.1
/lib/libattr.so.1.1.0

What do the numbers after so, such as in the last line, 1.1.0 mean?

My first guess was that they are version numbers, but:

~$ pacman -Qo /lib/libattr.so*
/lib/libattr.so is owned by attr 2.4.46-1
/lib/libattr.so.1 is owned by attr 2.4.46-1
/lib/libattr.so.1.1.0 is owned by attr 2.4.46-1

So the 1.1.0 does not seem to have any connection to the version of the library, reported to be 2.4.46.


Solution 1:

They are different versions of the libraries. Different applications might need different versions so each file includes the version name, that way they can all be installed at the same time. You'll find that the ones without version numbers actually point to one of the ones that has a version number via a symlink, so that applications that don't need specific versions can simply request the library that has no version number and get the latest version installed on the system.