LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-10-2004, 12:20 AM   #1
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Rep: Reputation: 34
Question Command to check library dependencies


I know this is a basic thing, but I can't for the life of me figure it out.. what was the name of the Linux command that takes the name of a shared library as the argument and lists all the libraries that it depends upon? I googled for it, but I couldn't find the right answer.

Thanks!
Dai
 
Old 12-10-2004, 12:54 AM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,288

Rep: Reputation: 65
ldd
 
Old 12-10-2004, 12:59 AM   #3
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Original Poster
Rep: Reputation: 34
Quote:
Originally posted by whansard
ldd
Thanks a million! Exactly what I needed.
 
Old 12-04-2014, 10:54 PM   #4
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
dep-trace makes total dependancy tables, sorted by dep, rdep too

some depends idiot just uploaded this. i'm sure it shows things LDD doesn't but it's not well tested yet. a small bit of output is shown below. it comparable to ldd but features are very different.

http://sourceforge.net/p/dep-trace/

http://sourceforge.net/projects/dep-trace/files/libdeps

should show total dependancy table of what ldconfig(1) will load (or has already loaded) and show which libs are NOT_FOUND (ie, no version or file) and then also what is effected.

try it, enjoy. it's very new so don't say i didn't tell you. it did just find some things below i didn't know about my lib system - i'm just about to go fix that.
libdeps objdump -h

(dep-trace is needed, depsort script too, are the the URL ^^. libdeps uses objdump(1) -> dt -> makes a table of each and all deps+rdeps, formats/markup, shows - quickly)

Experimental - see help libdeps [objdump | ldd] [-l | file] -l use find *.so is used on ldconfig dirs file one file.so per line snip...
libdeps objdump -d

LIBTABLE

ld-linux.so.2(file)

ld-linux.so.2(GLIBC_2.0)(file)

ld-linux.so.2(GLIBC_2.1)(file)

ld-linux.so.2(GLIBC_2.0)(file)

ld-linux.so.2(GLIBC_2.3)(file)

ld-linux.so.2(GLIBC_2.1)(file)

ld-linux.so.2(GLIBC_PRIVATE)(file)

ld-linux.so.2(GLIBC_2.3)(file)

libBrokenLocale.so.1(file)

snip ...

libc.so.6 libc.so.6(file) ld-linux.so.2 ld-linux.so.2(GLIBC_2.0) ld-linux.so.2(GLIBC_2.1) ld-linux.so.2(GLIBC_PRIVATE)

snip ...

libanl.so.1 libanl.so.1(file) ld-linux.so.2 ld-linux.so.2(GLIBC_2.0) ld-linux.so.2(GLIBC_2.1) ld-linux.so.2(GLIBC_PRIVATE) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.0) libc.so.6 libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_PRIVATE) libc.so.6(GLIBC_2.3.2) libc.so.6(GLIBC_2.1.2) libpthread.so.0(GLIBC_2.1) libpthread.so.0

libnss_db.so.2 libnss_db.so.2(file) ld-linux.so.2 ld-linux.so.2(GLIBC_2.0) ld-linux.so.2(GLIBC_2.1) ld-linux.so.2(GLIBC_PRIVATE) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.0) libc.so.6 libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.3) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_PRIVATE) libnss_files.so.2 libnss_files.so.2(GLIBC_PRIVATE) libdb3.so.3(NOT_FOUND) libdb3.so.3(DB3_2)(NOT_FOUND)

snip...

NOT_FOUND libctutils.so.0

libdb3.so.3

libdb3.so.3(DB3_2)

EFFECTED libctutils.so.0 libconsole.so.0

libdb3.so.3 libnss_db.so.2

libdb3.so.3(DB3_2) libnss_db.so.2

libconsole.so.0

libnss_db.so.2

12/04/14 21:56 -0500 Thursday, December 04, 2014, 09:56:35 PM EST
 
Old 12-04-2014, 11:11 PM   #5
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
the runtime of the above on (find /lib/ -type f -maxdepth 1) (to dep-trace, make and store tables including rdeps, plus markup output on stdout was:

0.2 sec , on a 1.6 GHz cpu
 
Old 12-04-2014, 11:15 PM   #6
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
on Debian linux, all files installed by wonderful pkg-depends knowing dpkg(1) keeps list of all installed files in /var/lib/dpkg/info/pkgnames.list

one can use (awk) to check that ONLY LIBS dpg installed are in libs dirs. anything else and ldconfig(1) may use it instead - and anything dpkg(1) didn't install might not be complete (may have missing lib files not on system)

(or not at least not on the path /etc/ld.so.conf or LD_LIBRARY_PATH)

(if you use the bash env you can change the order and sight of which libs ld.so loads: you can test libs by putting a set in an experimental directory and applying LD_LIBRARY_PATH to just that shell - that way if the lib set is broken: you only loose one terminal and do not need a rescue disk !!)
 
Old 12-04-2014, 11:26 PM   #7
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,268
Blog Entries: 11

Rep: Reputation: 3247Reputation: 3247Reputation: 3247Reputation: 3247Reputation: 3247Reputation: 3247Reputation: 3247Reputation: 3247Reputation: 3247Reputation: 3247Reputation: 3247
You have responded to a 10 year old thread... necro-posting is usually discouraged, maybe consider opening a new thread if you have something new to post.
 
  


Reply

Tags
dep-trace


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
check dependencies syeronne Linux - Newbie 1 11-30-2005 10:53 AM
xscreensaver install trouble: library dependencies marquitico Linux - Newbie 4 08-26-2005 09:28 PM
Does ./configure command do a check on dependencies? Akhran Linux - Newbie 1 08-18-2005 07:20 AM
complicated library dependencies mickepe Linux - Newbie 2 08-05-2005 05:43 AM
library dependencies bipins1979 Linux - Software 2 03-21-2005 11:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration