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

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s