LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-19-2004, 09:22 AM   #1
zsjoska
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,
zsjoska.
 
Old 11-19-2004, 09:30 AM   #2
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Example:
ldd /usr/X11R6/bin/glxinfo

Yves.
 
Old 11-19-2004, 01:45 PM   #3
browland601
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!

Cheers,

Ben
 
  


Reply


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: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
Urgent !!! rpm: error while loading shared libraries: libelf.so.1: cannot open shared tinaa Linux - Software 5 12-02-2008 03:19 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 07:03 AM
mplayer: error while loading shared libraries: libdvdread.so.3: cannot open shared ob Bruce Hill Slackware 6 12-11-2003 08:34 AM
linux init error in loading shared shared libraries akaran Linux - Software 1 05-28-2003 04:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:30 AM.

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