CertGrid CertGrid
Hands-on Lab·LPIC-1

Shared libraries and what a binary needs

Objective 102.3 is about the libraries a program needs and where they are found. This guide reads the dependencies of the same command on both families, shows the loader's search order by making one directory win, adds that directory to the cache properly and shows it NOT winning - then explains why those two results are different.

101: Installation and Packages Guide 30 of 33 Intermediate

Both families, because the library paths differ and the mechanism does not. Only a copy in `/tmp` is ever modified.
Server NameIP AddressOSRolesCPURAMHDD
LPIC1-A01192.168.0.76Ubuntu 26.04 LTSDebian-family host - dpkg and apt, which objective 102.4 names2 Core4 GB50 GB
LPIC1-B01192.168.0.77AlmaLinux 10.2RPM-family host - rpm and dnf, which objective 102.5 names2 Core4 GB50 GB

This guide includes

Use this when a program will not start with an error about a .so file, or when software installed outside the package manager cannot find its own libraries. This matters because the fix depends entirely on which of three mechanisms is in play, and because one of them overrides the others without leaving a trace on disk.

Before you start

  1. What a program needs before it can start

  2. Two things ldd will not tell you

  3. Where the loader looks, and the cache it looks in first

  4. A directory that wins without asking anyone

  5. Telling the cache about it properly

  6. Putting the machine back

Official sources