view shared library dependencies ??? ldd !

Ever wanted to know the library dependencies of a program ? ? ?

Since I was configuring Apache2.x in my box and had some troubleshooting because of my initial setup, I just wanted to know which libraries my already installed Apache depends. This is when I learned about the powerfull “ldd” command. (This is in Linux)

ldd” command shows the shared library dependencies of a program.

My sample is as follows:

prabhugnanasundar@prabhugnanasundar:~$ ldd /usr/local/apache2/bin/httpd => (0xb7ef8000) => /lib/i686/cmov/ (0xb7ec2000) => /usr/local/apache2/lib/ (0xb7ea5000) => /usr/local/lib/ (0xb7e7e000) => /usr/local/apache2/lib/ (0xb7e57000) => /lib/i686/cmov/ (0xb7e4e000) => /lib/i686/cmov/ (0xb7e1c000) => /lib/i686/cmov/ (0xb7e03000) => /lib/i686/cmov/ (0xb7dfe000) => /lib/i686/cmov/ (0xb7cb7000)
/lib/ (0xb7ef9000)

“ldd” was really handy in helping me figure out the dependent libraries of the httpd

NOTE: ldd does not work on a.out shared libraries.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s