Prev | Current Page 1420 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"

That is ldd??™s job. It lists the shared libraries that a program
requires to run. Its syntax is:
ldd [options] file
ldd prints the names of the shared libraries that file requires. Two of ldd??™s most useful options
are -d, which reports any missing functions, and -r, which reports missing functions and missing
data objects. For example, the following ldd reports that the mail client mutt (which may or may
not be installed on your system) requires eight shared libraries.
$ ldd /usr/bin/mutt
libncursesw.so.5 => /lib/libncursesw.so.5 (0x40021000)
libssl.so.0 => /usr/lib/libssl.so.0 (0x40066000)
libcrypto.so.0 => /usr/lib/libcrypto.so.0 (0x40097000)
libc.so.6 => /lib/libc.so.6 (0x40195000)
libgpm.so.1 => /lib/libgpm.so.1 (0x402c5000)
libdl.so.2 => /lib/libdl.so.2 (0x402cb000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
libncurses.so.5 => /lib/libncurses.so.5 (0x402ce000)
The output might be different on your system.
TIP
791
Programming Tools and Utilities 29
The ldconfig Command
ldconfig determines the runtime links required by shared libraries that are located in /usr/lib
and /lib, specified in libs on the command line, and stored in /etc/ld.so.conf. It works in
conjunction with ld.so, the dynamic linker/loader, to create and maintain links to the most current
versions of shared libraries available on a system.


Pages:
1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432