Linux

How to automatically resolve errors associated with failed dependencies

Dependency resolution

Sometimes, installing a package on a Linux machine can become quite frustrating when you encounter dependency resolution issues; these dependencies can even sometimes come in a loop and you’d be downloading and installing dependencies over and over again and it feels like you are stuck in a loop. This tutorial will demonstrate with two methods, how to resolve dependency issues in a few steps.

Method 1: yumdownloader

Furthermore, In this example, I am attempting to install the selinux-policy-devel package. Now, I have this failed dependency error and a couple of other packages listed below the error line.

Automated error handling

To resolve this:
However, Install the yum-utils tool. This tool sis included in the default/local repository of your Linux O/S.

Failed dependencies management

Moreover, In this yum-utils, you have a yumdownloader package. On your Linux terminal, migrate to the directory you want to download the desired package to (in this case, the desired package is the selinux-policy-devel). In addition, use the following command to download the desired package:

sudo yumdownloader packagename
Error resolution automation

Now that you’ve finished downloading the package, use the ‘yum install’ command to install it. If you go through the next two images, you will see the package and its dependencies have all been installed

Dependency resolution
Automated error handling

METHOD 2: local install

This method is much more direct
For this example, I am attempting to install the virt-install package. Again, the installation process has raised a resolve errors associated with failed dependencies dependency red flag.

Failed dependencies management

All you need do is use the following yum command:

 sudo yum --nogpgcheck localinstall directory/packagename.rpm

What this command does is to automatically look for the dependencies in your enabled repository and install them

The image below shows how to resolve errors associated with failed dependencies, with the necessary dependencies that have been resolved along with the desired package.

I hope you have found this tutorial easy enough to follow to resolve errors associated with failed dependencies.

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x