5

After many months (> 6) of no software upgrades, I logged into an EC2 instances running:

Linux version 2.6.32-358.23.2.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Sat Sep 14 05:32:37 EDT 2013

and then tried to do the usual yum-update:

# yum update

Well, that failed with errors like these:

--> Finished Dependency Resolution
Error: Package: coreutils-libs-8.4-19.el6_4.2.x86_64 (@rhui-us-east-1-rhel-server-releases)
           Requires: coreutils = 8.4-19.el6_4.2
           Removing: coreutils-8.4-19.el6_4.2.x86_64 (@rhui-us-east-1-rhel-server-releases)
               coreutils = 8.4-19.el6_4.2
           Updated By: coreutils-8.4-31.el6_5.1.x86_64 (rhui-REGION-rhel-server-releases)
               coreutils = 8.4-31.el6_5.1
           Available: coreutils-8.4-9.el6.x86_64 (rhui-REGION-rhel-server-releases)
               coreutils = 8.4-9.el6
           Available: coreutils-8.4-13.el6.x86_64 (rhui-REGION-rhel-server-releases)
               coreutils = 8.4-13.el6
           Available: coreutils-8.4-16.el6.x86_64 (rhui-REGION-rhel-server-releases)
               coreutils = 8.4-16.el6
           Available: coreutils-8.4-19.el6.x86_64 (rhui-REGION-rhel-server-releases)
               coreutils = 8.4-19.el6
           Available: coreutils-8.4-19.el6_4.1.x86_64 (rhui-REGION-rhel-server-releases)
               coreutils = 8.4-19.el6_4.1
           Available: coreutils-8.4-31.el6.x86_64 (rhui-REGION-rhel-server-releases)
               coreutils = 8.4-31.el6
Error: Package: abrt-addon-python-2.0.8-16.el6_4.1.x86_64 (@rhui-us-east-1-rhel-server-releases)
           Requires: abrt = 2.0.8-16.el6_4.1
           Removing: abrt-2.0.8-16.el6_4.1.x86_64 (@rhui-us-east-1-rhel-server-releases)
               abrt = 2.0.8-16.el6_4.1
           Updated By: abrt-2.0.8-21.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-21.el6
           Available: abrt-1.1.13-4.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 1.1.13-4.el6
           Available: abrt-1.1.16-3.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 1.1.16-3.el6
           Available: abrt-2.0.4-14.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.4-14.el6
           Available: abrt-2.0.8-6.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-6.el6
           Available: abrt-2.0.8-6.el6_3.2.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-6.el6_3.2
           Available: abrt-2.0.8-15.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-15.el6
Error: Package: abrt-addon-ccpp-2.0.8-16.el6_4.1.x86_64 (@rhui-us-east-1-rhel-server-releases)
           Requires: abrt = 2.0.8-16.el6_4.1
           Removing: abrt-2.0.8-16.el6_4.1.x86_64 (@rhui-us-east-1-rhel-server-releases)
               abrt = 2.0.8-16.el6_4.1
           Updated By: abrt-2.0.8-21.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-21.el6
           Available: abrt-1.1.13-4.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 1.1.13-4.el6
           Available: abrt-1.1.16-3.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 1.1.16-3.el6
           Available: abrt-2.0.4-14.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.4-14.el6
           Available: abrt-2.0.8-6.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-6.el6
           Available: abrt-2.0.8-6.el6_3.2.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-6.el6_3.2
           Available: abrt-2.0.8-15.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-15.el6
Error: Package: abrt-addon-kerneloops-2.0.8-16.el6_4.1.x86_64 (@rhui-us-east-1-rhel-server-releases)
           Requires: abrt = 2.0.8-16.el6_4.1
           Removing: abrt-2.0.8-16.el6_4.1.x86_64 (@rhui-us-east-1-rhel-server-releases)
               abrt = 2.0.8-16.el6_4.1
           Updated By: abrt-2.0.8-21.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-21.el6
           Available: abrt-1.1.13-4.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 1.1.13-4.el6
           Available: abrt-1.1.16-3.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 1.1.16-3.el6
           Available: abrt-2.0.4-14.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.4-14.el6
           Available: abrt-2.0.8-6.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-6.el6
           Available: abrt-2.0.8-6.el6_3.2.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-6.el6_3.2
           Available: abrt-2.0.8-15.el6.x86_64 (rhui-REGION-rhel-server-releases)
               abrt = 2.0.8-15.el6
Error: Package: glibc-devel-2.12-1.107.el6_4.5.x86_64 (@rhui-us-east-1-rhel-server-releases)
           Requires: glibc-headers = 2.12-1.107.el6_4.5
           Removing: glibc-headers-2.12-1.107.el6_4.5.x86_64 (@rhui-us-east-1-rhel-server-releases)
               glibc-headers = 2.12-1.107.el6_4.5
           Updated By: glibc-headers-2.12-1.132.el6.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.132.el6
           Available: glibc-headers-2.12-1.7.el6.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.7.el6
           Available: glibc-headers-2.12-1.7.el6_0.3.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.7.el6_0.3
           Available: glibc-headers-2.12-1.7.el6_0.4.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.7.el6_0.4
           Available: glibc-headers-2.12-1.7.el6_0.5.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.7.el6_0.5
           Available: glibc-headers-2.12-1.25.el6.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.25.el6
           Available: glibc-headers-2.12-1.25.el6_1.3.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.25.el6_1.3
           Available: glibc-headers-2.12-1.47.el6.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.47.el6
           Available: glibc-headers-2.12-1.47.el6_2.5.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.47.el6_2.5
           Available: glibc-headers-2.12-1.47.el6_2.9.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.47.el6_2.9
           Available: glibc-headers-2.12-1.47.el6_2.12.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.47.el6_2.12
           Available: glibc-headers-2.12-1.80.el6.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.80.el6
           Available: glibc-headers-2.12-1.80.el6_3.3.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.80.el6_3.3
           Available: glibc-headers-2.12-1.80.el6_3.4.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.80.el6_3.4
           Available: glibc-headers-2.12-1.80.el6_3.5.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.80.el6_3.5
           Available: glibc-headers-2.12-1.80.el6_3.6.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.80.el6_3.6
           Available: glibc-headers-2.12-1.80.el6_3.7.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.80.el6_3.7
           Available: glibc-headers-2.12-1.107.el6.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.107.el6
           Available: glibc-headers-2.12-1.107.el6_4.2.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.107.el6_4.2
           Available: glibc-headers-2.12-1.107.el6_4.4.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-headers = 2.12-1.107.el6_4.4
 You could try using --skip-broken to work around the problem
** Found 143 pre-existing rpmdb problem(s), 'yum check' output follows:

After reading several articles, I tried several things to correct the issue:

  • Ran yum clean all, then yum update.
  • Ran rpmdb --rebuilddb, then package-cleanup --dupes, then package-cleanup --cleandupes.
  • Ran yum-complete-transaction, etc.

In all cases, I ended up in the same place. One article suggested that I might have conflicting packages for glibc. In any case, I cannot tell what is going on. Should I re-instance my EC2, or does someone have a solution?

Thanks!

6 Answers 6

9

Resolving yum-updates for my RHEL 6.4 (Fedora 12+) environment was time-consuming but ultimately successful. I want to share what I did, and what could have been better.

  1. I identified all package duplicates. Presumably package-clean --dupes does the same. Another helpful command was rpm -qa package-name, which identified duplicate packages by prefix or generic package name.
  2. I then removed all versions of coreutils and coreutils-lib, more or less following this sequence of commands: (i) rpm -e --nodeps coreutils, (ii) rpm -e --nodeps coreutils-lib, (iii) updatedb, and (iv) yum clean all. NOTE: removing coreutils is generally NOT advisable, as it renders inoperable numerous other commands.
  3. I then reinstalled the latest versions of coreutils and coreutils-lib: yum install coreutils coreutils-lib
  4. At this point, I still had like 100 duplicate packages. Unfortunately, my EC2 is running a micro instance, and in several runs of package-cleanup --cleandupes, I ran into memory-allocation issues, as well as coredumps. I thus manually had to remove each duplicate package, using the earlier mentioned command: rpm -e --nodeps package-name.
  5. Once duplicate packages were removed, I ran (i) updatedb, (ii) yum clean all, and (iii) yum update.

After all of this, things now work.

SUGGESTION: it would be helpful if there were a command like "yum self-resolve". It would exercise a best-guess policy of what packages to expunge, and what to keep, so as to bring a stale environment up-to-date. If such a command already exists, please let me know.

2
  • after a long time of pulling my hair out I figured you were right about manually removing coreutils and it worked. amazing. Commented Mar 3, 2016 at 18:46
  • 1
    You're a god damn wizard! I came from Google searching for how to fix duplicate packages after running out of memory during a yum upgrade. This solved all my problems. Commented Jun 20, 2018 at 19:08
8

For me worked sudo package-cleanup --cleandupes

1
  • 2
    For those who don't have it, package-cleanup is available from the yum-utils package. Commented Apr 6, 2018 at 10:27
3

What worked for me was running:

yum distro-sync
package-cleanup --cleandupes --skip-broken
yum update

The key that seemed to fix things was the first line - yum distro-sync

0
1

Just throwing this out in case it helps someone going forward. I had fedora-updates-testing repo enabled because I needed something from there to resolve crashing x-window stuff. I forget to disable it afterward, until on upgrade after quite a period I got bazillions of duplicates. Disabling the repo by sudo vi /etc/yum.repos.d/fedora-updates-testing.repo and changing enabled=1 to enabled=0 got rid of all the duplicates, and upgrading worked fine.

0

Me too I was once unable to update my system (package-cleanup or yum clean all did not help either). After two days I was able to.

If you have not added unofficial repos to your distribution, it may be a problem of your mirror or just a bad/incomplete package update in the repository (which will probably be fixed soon then).

-2

register to satellite server worked for me, earlier it was point to redhat 5.x channel and register to rhel 6 channel fixed the issue.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .