[Fixed] dpkg: dependency problems prevent configuration in Ubuntu

In this article, we cover how to fix an error; dpkg: dependency problems prevent configuration

dpkg: dependency problems prevent configuration of <package_name>:
dpkg: error processing <package_name> (--install):
Errors were encountered while processing:
<package_name>

We get this error while installing a .deb package through dpkg (a package manager for Debian) in Ubuntu or other Debian-based distributions.

[Fixed] dpkg: dependency problems prevent configuration in Ubuntu

The issue is mainly due to package dependency issues. When we install a package then you would have noticed that our package manager installs other additional packages as well. If we don’t install these additional packages. Then, it just won’t continue with the installation process.

These additional packages are the dependencies. The package we install depends on these packages to function. When we install a package available in standard repositories. Then, the package manager would find the dependencies for us and install the relevant packages.

But, when we download a .deb file and install the package through it. The dpkg tool won’t be able to install dependencies even if they are part of standard repositories. So, the entire operation results in an error.

The best way to resolve the issue is through the following command:

sudo apt install -f

-f option – to fix broken packages.

Note: The above command requires Administrative rights. Contact your System Administrator for assistance if you don’t have the necessary rights to make changes to your system.

This would install the necessary dependencies and we won’t have to install the package again through the .deb file. It should work as intended now.

In conclusion, we have covered here how to fix an error; dpkg: dependency problems prevent configuration in Ubuntu.

Additional Info:

Unless otherwise required, we can also use apt to install .deb files. This won’t result in dependency issues. It would directly install the dependencies if they are part of standard repositories. Use the following command to install a .deb file through apt (or, Advanced package tool) in Ubuntu or Debian-based distribution.

sudo apt install ./<package-name>.deb

For instance,

sudo apt install ./wps-office_11.1.0.11698.XA_amd64.deb

Similar Posts