rpm Packages and Shared Library Dependencies


When the programmer builds an rpm package, the ldd command is used to report all of the shared libraries used by all of the dynamic executables in their package. Another confusion is added by the fact that different dynamic executables within the same software package may have been linked with different versions of the same shared library package. For example, different programs within the Heartbeat package may have been developed and dynamically linked to different GLIBC versions of the libc.so.6 soname shared library file.

You can see the full list of the shared libraries required by an rpm package with the -q and --requires arguments to the rpm command. For example, to see all of the required dependencies for the Heartbeat rpm package, use the command:

 #rpm -q --requires -p heartbeat-1.x.x.i386.rpm 

This produces the following report:

 sysklogd /bin/sh /bin/sh /usr/bin/python ld-linux.so.2 libapphb.so.0 libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.3) libccmclient.so.0 libdl.so.2 libglib-1.2.so.0 libhbclient.so.0 libpils.so.0 libplumb.so.0 libpthread.so.0 librt.so.1 libstonith.so.0 

Notice from this report that the libc.so.6 soname is required and that this shared library must support dynamic executables that were linked using the GLIBC shared package version numbers 2.0, 2.1, 2.1.3, 2.2, and 2.3. This is due to the fact that different dynamic executables within the Heartbeat package were linked against each of these different versions of the libc.so.6 library.

With this background knowledge of how dynamic executables, shared objects, sonames, and shared library packages relate to each other, we are ready to look at an example of what happens when you try to install an rpm package and it fails due to a dependency error.



The Linux Enterprise Cluster. Build a Highly Available Cluster with Commodity Hardware and Free Software
Linux Enterprise Cluster: Build a Highly Available Cluster with Commodity Hardware and Free Software
ISBN: 1593270364
EAN: 2147483647
Year: 2003
Pages: 219
Authors: Karl Kopper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net