View Single Post
Old 03 April 2015, 11:26   #78
Locutus
Registered User

 
Join Date: Jul 2014
Location: Finland
Posts: 768
Quote:
Originally Posted by Mrs Beanbag View Post
I never liked package management when i first started using Linux, but i do like the fact that when you install a package it installs all its dependencies as well. It would be nice if there were some quick way to query an executable to find which libraries it needs. Maybe a special hunk in the executable could contain such a list? But this is getting a bit off-topic.
standard tool really, just do something like this:

locutus ▶ Malacoda ▶ ~ ▶ $ ▶ ldd (which ls)
linux-vdso.so.1 (0x00007fffcbbf5000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fe486383000)
libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x00007fe48617a000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe485dd0000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fe485b62000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe48595e000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe4865ea000)
libattr.so.1 => /lib/x86_64-linux-gnu/libattr.so.1 (0x00007fe485758000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe48553b000)

And you see which shared libraries it links to.

Ofcourse this doesnt map to what actual packages it requires, so you can do (on Debian)

locutus ▶ Malacoda ▶ ~ ❯ tmp ❯ tree ▶ $ ▶ apt-cache showpkg e-uae|tail -n 5
Dependencies:
0.8.29-WIP4-10 - libatk1.0-0 (2 1.29.3) libc6 (2 2.3) libcairo2 (2 1.2.4) libfontconfig1 (2 2.8.0) libfreetype6 (2 2.2.1) libglib2.0-0 (2 2.16.0) libgtk2.0-0 (2 2.8.0) libpango1.0-0 (2 1.14.0) libsdl1.2debian (2 1.2.10-1) zlib1g (2 1:1.1.4)

And you see a list of all direct dependencies.

Now if you want to see the whole graph visually you can do:

debtree e-uae | dot -Tpng >e-uae.png and get this:

http://http://locutus.puscii.nl/e-uae.png

Last edited by Locutus; 03 April 2015 at 11:37.
Locutus is offline  
 
Page generated in 0.08247 seconds with 9 queries