Install a package with dependencies

ubuntu_apps_compIt happens often – you like a package, download the .deb file to test it out, only to find that the package has missing dependencies and is installed in a broken state. You might just end up removing it without checking it out! But wait! There’s a very easy way to install the dependencies if they are already available in the repositories enabled in your system (otherwise you many have to add the repositories for the dependencies and update the repositories once). Here’s what I am trying to say:

$ sudo dpkg -i nice_app.deb
//installs but complains of missing dependencies. a broken install :(
$ sudo dpkg --configure -a
$ sudo apt-get -f install //save my day! install anything missing

If you want to do the same using a single command, install the gdebi package. gdebi can download and install (if available in your repos) the dependencies of a package. To install gdebi, run:

$ sudo apt-get install gdebi-core

Sample usage:

$ sudo gdebi nice_app.deb

Leave a Reply

Your email address will not be published. Required fields are marked *