Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-19-2004, 10:22 AM   #1
LQ Newbie
Registered: Oct 2004
Posts: 3

Rep: Reputation: 0
How to see which shared libraries are linked to a program

I just want to see a list of the shared libraries to which is linked an application.

e.g. if an application was liked with -lm
I want to see in the list "m" or "libm", etc.
Is in linux a command which shows this ?

Thanks for your help,
Old 11-19-2004, 10:30 AM   #2
Senior Member
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
ldd /usr/X11R6/bin/glxinfo

Old 11-19-2004, 02:45 PM   #3
LQ Newbie
Registered: Nov 2004
Location: London
Distribution: Suse 9.1 Pro
Posts: 1

Rep: Reputation: 0
I will also add something as I encountered this quite recently.

ldd ... etc. will show you the libraries statically linked (at compile), but there may also be ones dynamically pulled in when (eg) glxinfo is loaded.

If you think this is the case (i.e. you still seem to be missing libraries) you can use strace:

strace -o outfile /usr/X11R6/bin/glxinfo

This will then run glxinfo as above but also output what it's doing to load in modules at runtime.

You can then do:

less outfile

to view any problems in detail. Look for <module_name>.so.0 etc. Then you just have to figure out which errors matter!




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 06:47 AM
Urgent !!! rpm: error while loading shared libraries: cannot open shared tinaa Linux - Software 5 12-02-2008 04:19 PM
error while loading shared libraries: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 08:03 AM
mplayer: error while loading shared libraries: cannot open shared ob Bruce Hill Slackware 6 12-11-2003 09:34 AM
linux init error in loading shared shared libraries akaran Linux - Software 1 05-28-2003 05:40 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration