In a Debian-base system, program files, libraries and source codes are packaged and distributed as .deb files. Installation of .deb files can be done with a command-line tool called dpkg. However, typical .deb package has dependencies (or prerequisite packages) which need to be pre-installed for the .deb package to be able to be installed, and dpkg cannot resolve such dependencies.
For example, if you attempt to install a package called webmin using dpkg on fresh Ubuntu, dpkg will fail with the following dependency problems.
dpkg: dependency problems prevent configuration of webmin: webmin depends on libnet-ssleay-perl; however: Package libnet-ssleay-perl is not installed. webmin depends on libauthen-pam-perl; however: Package libauthen-pam-perl is not installed. webmin depends on apt-show-versions; however: Package apt-show-versions is not installed. dpkg: error processing webmin (--install): dependency problems - leaving unconfigured Processing triggers for ureadahead ... Errors were encountered while processing: webmin
When dealing with dependencies of .deb files, a Linux tool called gdebi is a blessing. With gdebi, you can install .deb files while resolving any unmet dependencies automatically.
The gdebi utility has two components: gdebi for a command-line tool, and gdebi-gtk for graphical front-end.
To install gdebi on Debian, Ubuntu or Linux Mint, run the following. It will install both components.
In order to install .deb file with dependencies, simply run gdebi with the target .deb file as follows. Any prerequisite packages will be installed automatically.
If you would like to use gdebi with graphical front-end, run the following.
Then you will see a package installer window as shown in the following screenshot.
If there are any dependencies to meet, the status in the window indicates such dependencies, and you can check them out by clicking on "Details" as shown below.
Finally, simply click on "Install Package" to proceed with .deb installation.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.