Monday, September 17, 2007

Listing the dependencies

I have come across many people who don't have access to internet connection and are worst hit by dependency problems while installing a package. Some time back, I myself was suffering from such problems. While borrowing from your friend, how to ensure that you have got all the files required to install a package? One such method is using:
apt-cache depends packages
where package is the name of the package of which dependencies are to be listed. For example,

$ apt-cache depends adduser
adduser
Depends: perl-base
Depends: passwd
|Depends: debconf
Depends:
cdebconf
debconf
Suggests: liblocale-gettext-perl
Suggests: perl-modules
Replaces: manpages-pl
Replaces: manpages-it

Shown above is the output of the command for package "adduser". The output lists out the packages on which the specified package depends along with the sub-dependencies.

Now, you are ready to use the above command to list the files on which your desired package depend, copy .deb files and install them using dpkg or other package managers. Rock your Linux box and enjoy!!!

No comments: