X
    Categories: Linux

How to resolve “error: Failed dependencies:” error

Learn quickly how to resolve “error: Failed dependencies:” error. This error comes when you do not have installed the dependent packages on the server.

Error: While installing packages you must have come across following error:

error: Failed dependencies:

Sample output of the Error is below while installing kernel:

[root@ip-172-31-9-104 kernel_pkg]# rpm -ivh kernel-3.10.0-514.10.2.el7.x86_64.rpm
error: Failed dependencies:
linux-firmware >= 20160830-49 is needed by kernel-3.10.0-514.10.2.el7.x86_64
xfsprogs < 4.3.0 conflicts with kernel-3.10.0-514.10.2.el7.x86_64
kmod < 20-9 conflicts with kernel-3.10.0-514.10.2.el7.x86_64

In the above output while upgrading the kernel, system needs rpm packages mentioned in the output.

How to resolve “error: Failed dependencies:”

  • Install the latest package using YUM repository:
yum install <Pkg name>

in Our case

yum install kernel
  • You can also download the packages required manually using RHN connected system and then move it to your offline server. Below command given on the yum server which is connected to RHN network.
yumdownloader --resolve  --destdir <download dir location> <Pkg Name>

e.g. In Our case for kernel packages

[root@ip-172-31-8-245 ~]# yumdownloader --resolve --destdir /var/tmp kernel
Loaded plugins: amazon-id, rhui-lb
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-514.10.2.el7 will be installed
--> Processing Dependency: linux-firmware >= 20160830-49 for package: kernel-3.10.0-514.10.2.el7.x86_64
--> Running transaction check
---> Package linux-firmware.noarch 0:20160830-49.git7534e19.el7 will be installed
--> Processing Conflict: kernel-3.10.0-514.10.2.el7.x86_64 conflicts kmod < 20-9
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package kmod.x86_64 0:20-5.el7 will be updated
---> Package kmod.x86_64 0:20-9.el7 will be an update
--> Processing Conflict: kernel-3.10.0-514.10.2.el7.x86_64 conflicts xfsprogs < 4.3.0
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package xfsprogs.x86_64 0:3.2.2-2.el7 will be updated
---> Package xfsprogs.x86_64 0:4.5.0-9.el7_3 will be an update
--> Finished Dependency Resolution
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/3): kmod-20-9.el7.x86_64.rpm | 115 kB 00:00:00
(2/3): xfsprogs-4.5.0-9.el7_3.x86_64.rpm | 895 kB 00:00:00
(3/3): linux-firmware-20160830-49.git7534e19.el7.noarch.rpm | 31 MB 00:00:00
[root@ip-172-31-8-245 ~]# cd /var/tmp
[root@ip-172-31-8-245 tmp]# ll
total 71372
-rw-r--r--. 1 root root 39080420 Mar 2 22:44 kernel-3.10.0-514.10.2.el7.x86_64.rpm
-rw-r--r--. 1 root root 117328 Nov 6 11:02 kmod-20-9.el7.x86_64.rpm
-rw-r--r--. 1 root root 32946308 Nov 6 11:02 linux-firmware-20160830-49.git7534e19.el7.noarch.rpm
-rw-r--r--. 1 root root 916416 Jan 22 07:49 xfsprogs-4.5.0-9.el7_3.x86_64.rpm
[root@ip-172-31-8-245 tmp]#

In our case we have downloaded all the dependent packages under the directory /var/tmp.

  • Once you moved the packages to offline system, go to that particular directory where packages are downloaded and give below command to resolve automatic dependency.
#yum localinstall *.rpm

 

Related Post