Wednesday, January 14, 2009

How to find the libraries a program requires ?

if you should need to know which libraries a program needs to work, to copy that program to another system, for example , or in case you receive an error message about missing libraries , you could use ldd to determine what is required.


Ex:-


ldd /sbin/fdisk
linux-gate.so.1 => (0xb7f7d000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e1b000)
/lib/ld-linux.so.2 (0xb7f7e000)


ldd /bin/cat
linux-gate.so.1 => (0xb7f21000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7dbf000)
/lib/ld-linux.so.2 (0xb7f22000)


source Erik M Keller

No comments:

Post a Comment