ldd flags & options
Basic usage
List shared libraries required by a binary.
ldd /usr/bin/git
-v, --verbose
Show detailed info including version requirements.
ldd -v /usr/bin/python3
-u, --unused
Show unused direct dependencies.
ldd -u /usr/bin/curl
-d, --data-relocs
Perform data relocations and report missing symbols.
ldd -d /usr/lib/libfoo.so
-r, --function-relocs
Perform both data and function relocations and report missing symbols.
ldd -r /usr/lib/libfoo.so
Check if a library is found
ldd /usr/bin/ffmpeg | grep "not found"
Find which library provides a symbol
Combine with grep to search for specific libraries.
ldd /usr/bin/node | grep ssl