Quickly reveal which shared libraries a program needs and find missing dependencies before they stop you. 16.11.2025 | reading time: 2 min Want to know why a program fails at startup? Use ldd to list the dynamic libraries a binary will load at runtime and spot "not found" entries before they become runtime errors. Find a missing library fast Run ldd on the program, inspect the output for "not found", then locate or install the missing library and update the loader cache; for example: ``` $ ldd ./myapp linux-vdso.so.1 => (0x00007ffc2b1d9000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8a6c5f2000) libfoo.so.1 => not found libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8a6c220000) ``` Then check the cache and possible installs: ``` $ ldconfig -p | grep libfoo $ sudo apt-get install libfoo1 # or use the distro package manager $ sudo ldconfig $ ldd ./myapp # confirm libfoo is now resolved ``` Watch for pitfalls ldd is fast and practical but not flawless: it prints "statically linked" for static binaries and may invoke the dynamic loader, so do not run ldd on untrusted executables; when you need a nonexecuting inspection use `readelf -d` or `objdump -p` to read DT_NEEDED entries instead. Mix tools to fix problems When ldd shows a missing or wrong-version library, combine package management to install the right package, `ldconfig` to refresh the cache, `LD_LIBRARY_PATH` for quick tests, and `patchelf` or rebuild with corrected rpath for permanent fixes; also use `strace` if the loader behavior needs tracing. Final note and next step ldd gives immediate visibility into a program's shared libraries and is often the first troubleshooting step before deeper inspection; learn more Linux internals and prepare for certifications like CompTIA Linux+ or LPIC-1 with intensive exam training at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. utilities troubleshooting processes scripting