DEV Community

Stack All Flow
Stack All Flow

Posted on • Originally published at stackallflow.com on

How to Let `Dpkg -I` Install Dependencies for Me in Ubuntu?

dpkg

Say, I have foo-1.2.3.deb which depends on perl and python, however, running command:

dpkg -i ./foo-1.2.3.deb

Enter fullscreen mode Exit fullscreen mode

won’t install these dependencies. So I must apt-get install perl python by hand.

How to make dpkg -i install these dependencies for me automatically?

Accepted Answer

After using dpkg, running the following command helped me to install the required dependencies:

sudo apt-get -f install

Enter fullscreen mode Exit fullscreen mode

In all, your terminal should look like this:

$ sudo dpkg -i package_with_unsatisfied_dependencies.deb
dpkg: dependency problems prevent ... 
[additional messages]

$ sudo apt-get -f install
[apt messages]
Setting up [dependency]...
Setting up package_with_unsatisfied_dependencies...

Enter fullscreen mode Exit fullscreen mode

Notice the line about Setting up package_with_unsatisfied_dependencies. This fixes (and completes) the installation of package_with_unsatisfied_dependencies.deb.

The post How to Let Dpkg -I Install Dependencies for Me in Ubuntu? appeared first on Stack All Flow.

Top comments (0)