Which programs use which libraries and vice-versa
I recently tried the newest version of crunchbang, and immediately after discovering iceweasel, I went straight back to my Ubuntu 10.10 install and found the .deb file online. When I tried to install, dpkg told me that it conflicts with hunspell-en-ca. I'm not really sure what this library does, (probably a spell-checker of sorts) but I would like to know which programs would be affected if I were to uninstall it. Is there a command to show which programs use which libraries and which libraries furnish to which programs (sorry for the awkward wording)?
Thanks |
Iceweasel is simply Firefox with the branding removed.
http://wiki.debian.org/Iceweasel According to the listing in Synaptic, hunspell-en-ca is the Canadian English dictionary for hunspell. |
Okay, well that works. But, now that I'm interested, does anyone know how to achieve the original goal of finding the ties between libraries and programs?
|
Well, I think your question is not so much focused on libraries as it is general package dependencies.
I'll give you an approach for that in one second, but there is a very low-level approach for libraries specifically. There's a program called "ldd" (not sure what package(s) provide it). If you run ldd on an executable binary (i.e. not a text script), it should tell you what libraries the binary might load at runtime. For example: Code:
$ ldd `which awk` Back to the package dependency versus library dependency. Check out this page if you use Debian-style deb packages. The examples show how to create a dependency graph. For this to work, you need to have the "dot" program installed (which is included in the graphviz package). It will generate a PNG file depicting what one (or more) packages are needed by any number of top-level packages. The web page also describes how to go in reverse (find all packages that depend on a specific package). EDIT: Be careful though. Some high level packages will generate a LOT of dependencies. For instance, I just ran the commands for package openvpn. The data file for the dot program was 200+ kilobytes in size. That will create a massive graph (and likely require a LONG time to process). EDIT2: I should also point out that you can get the package dependency information through apt-cache by itself (without the use of dot). See the man page for apt-cache and the "showpkg" action. For me, I prefer the visuals. |
All times are GMT -5. The time now is 04:48 PM. |