How to remove duplicates after a failed yum update?
It's possible that some packages were installed, but the old ones not yet removed, and the 'transaction' didn't finish, so you're in a weird state where package1 is too old to support package2.
I had something similar, but only on one package. It just told me systemd conflicts with dracut-033-502.el7
(yum check
also reported lots of duplicate packages).
To solve this, I checked the versions of dracut:
rpm -vqa | grep dracut
...and then downgraded to the previous version by removing the highest version. That got rid of the conflicting package. From then on:
package-cleanup --dupes
...got rid of the duplicates, and then finally a:
yum update
...to get everything updated, and to generally correct all the errors.
Related videos on Youtube
Comments
-
D010s over 1 year
I probably ran out of memory when I tried to update packages on my CentOS system. Now when I try to run updates it got stuck:
Error: Package: glibc-devel-2.17-157.el7_3.5.x86_64 (@updates) Requires: glibc-headers = 2.17-157.el7_3.5 Removing: glibc-headers-2.17-157.el7_3.5.x86_64 (@updates) glibc-headers = 2.17-157.el7_3.5 Updated By: glibc-headers-2.17-196.el7.x86_64 (base) glibc-headers = 2.17-196.el7 You could try using --skip-broken to work around the problem ** Found 75 pre-existing rpmdb problem(s), 'yum check' output follows: audit-2.6.5-3.el7_3.1.x86_64 has missing requires of audit-libs(x86-64) = ('0', '2.6.5', '3.el7_3.1')
It looks like there are many duplicate packages. I tried to revert the update with
yum history undo 48
but it comes up with a whole lot of messages 'Failed to downgrade: this-or-that-package.x86-64'. So that did not help. I also tried:package-cleanup --cleandupes
It asks to remove 50 packages but results in:
ERROR with transaction check vs depsolve: systemd = 219-42.el7_4.1 is needed by (installed) systemd-sysv-219-42.el7_4.1.x86_64 systemd = 219-42.el7_4.1 is needed by (installed) systemd-sysv-219-42.el7_4.1.x86_64 openssh = 7.4p1-12.el7_4 is needed by (installed) openssh-clients-7.4p1-12.el7_4.x86_64 openssh = 7.4p1-12.el7_4 is needed by (installed) openssh-clients-7.4p1-12.el7_4.x86_64 iptables = 1.4.21-18.0.1.el7.centos is needed by (installed) iptables-services-1.4.21-18.0.1.el7.centos.x86_64 Complete! (1, [])
I am not sure how to fix this. Most important is that downtime is limited and that I can install updates again on a regular basis (as it is in use as a server). I hope someone can suggest some steps to resolve these dependency problems.
uname -a Linux host.example.com 3.10.0-123.8.1.el7.x86_64 #1 SMP Mon Sep 22 19:06:58 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
-
egthomas over 6 yearsHave you tried 'yum clean all'
-
D010s over 6 yearsYes I did, but it did not help.
-
Alexander Tolkachev over 6 yearsCould you show your output for
rpm -qa
? Did you have any duplicates installed?
-