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 it comes to 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. Depending on whether you are on a Linux desktop or a headless server, you can install only a command line tool or a full GUI version.
Install .deb File with Dependencies on a Headless Server
To install gdebi CLI on Debian, Ubuntu or Linux Mint, run the following.
Now simply run gdebi with the target .deb file to install it while handling its dependencies. Any prerequisite packages will be installed automatically.
Install .deb File with Dependencies in Desktop Environment
While you can still use gdebi CLI tool in the desktop environment, you can also try gdebi with a GUI frontend. For this, install gdebi as follows. Its GTK frontend will also be installed.
Then issue the command below to install a .deb file.
You will see a package installer GUI 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.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!
Latest posts by Dan Nanni (see all)
- How to back up a WordPress website to remote cloud storage from the Linux command line - November 24, 2015
- How to access Dropbox from the command line in Linux - November 22, 2015
- How to send email notifications using Gmail SMTP server on Linux - November 9, 2015