9

I am getting errors, I think with coreutils, where yum won't update. Here is a stripped down output from what I see when I run yum update:

Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package PyYAML.x86_64 0:3.10-3.el6 will be updated
---> Package PyYAML.x86_64 0:3.10-3.1.el6 will be an update
... more of the same, and then:
--> Processing Dependency: coreutils = 8.4-31.el6_5.2 for package: coreutils-libs-8.4-31.el6_5.2.x86_64
---> Package coreutils.x86_64 0:8.4-37.el6 will be an update
... then more of the same    --> Finished Dependency Resolution
--> Running transaction check
---> Package coreutils.x86_64 0:8.4-31.el6_5.2 will be updated
--> Processing Dependency: coreutils = 8.4-31.el6_5.2 for package: coreutils-libs-8.4-31.el6_5.2.x86_64
---> Package kernel.x86_64 0:2.6.32-431.17.1.el6 will be erased
--> Finished Dependency Resolution
Error: Package: coreutils-libs-8.4-31.el6_5.2.x86_64 (@updates)
           Requires: coreutils = 8.4-31.el6_5.2
           Removing: coreutils-8.4-31.el6_5.2.x86_64 (@updates)
               coreutils = 8.4-31.el6_5.2
           Updated By: coreutils-8.4-37.el6.x86_64 (base)
               coreutils = 8.4-37.el6
 You could try using --skip-broken to work around the problem
** Found 71 pre-existing rpmdb problem(s), 'yum check' output follows:
audit-libs-2.3.7-5.el6.x86_64 is a duplicate with audit-libs-2.2-4.el6_5.x86_64
audit-libs-python-2.3.7-5.el6.x86_64 is a duplicate with audit-libs-python-2.2-4.el6_5.x86_64
... then lots more like the above duplicate

I have another server that's (almost) identical to this (they are load balanced and work from the same image) and that one hasn't got this same problem. What might be the problem and how should I best proceed?

Update:

I also ran yum-complete-transaction that failed and said it had renamed the transaction files. It still says there is an incomplete transaction but now this happens when I run it:

[root@nico ~]# yum-complete-transaction
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * webtatic: uk.repo.webtatic.com
drivesrvr                                                                                                                                                                                                                                |  951 B     00:00
There are 1 outstanding transactions to complete. Finishing the most recent one
The remaining transaction had 252 elements left to run
... lots of:
Package name-1.23.x8x_64 already installed and latest version
...
--> Running transaction check
... lots of entries like this:
---> Package PyYAML.x86_64 0:3.10-3.el6 will be updated
... and this:
---> Package PyYAML.x86_64 0:3.10-3.1.el6 will be an update
... and this:
---> Package audit-libs.x86_64 0:2.2-4.el6_5 will be erased
Killed

It then suddenly stops with the Killed line.

I tried running yum update --skip-broken next:

[root@nico ~]# yum update --skip-broken
Freeing read locks for locker 0x7d: 28940/139976145426176
Freeing read locks for locker 0x7f: 28940/139976145426176
Freeing read locks for locker 0x80: 28940/139976145426176
Freeing read locks for locker 0x81: 28940/139976145426176
Freeing read locks for locker 0x82: 28940/139976145426176
Loaded plugins: downloadonly, fastestmirror, replace
Setting up Update Process
Loading mirror speeds from cached hostfile
 * webtatic: uk.repo.webtatic.com
drivesrvr                                                                                                                                                                                                                                |  951 B     00:00
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
--> Running transaction check
... lots of will be updated/will be an update/etc, then:
--> Processing Dependency: coreutils = 8.4-31.el6_5.2 for package: coreutils-libs-8.4-31.el6_5.2.x86_64

Then several more Running transaction check:s, and Processing Dependency: coreutils =... entries among more willy be updated/willbe an update entries. Then:

Packages skipped because of dependency problems:
    coreutils-8.4-37.el6.x86_64 from base

Dependencies Resolved

Then I'm shown a table with a list of Installing: and Updating: packages, with a summary at the end:

Install       2 Package(s)
Upgrade      79 Package(s)
Remove        1 Package(s)

It then downloads all packages (81/81 successfully) and finally shows this:

Total                                                                                                                                                                                                                           3.0 MB/s | 115 MB     00:37
Running rpm_check_debug
Killed

Update 2:

I also ran yum clean all and had some problems there too. I found some advice to remove the __db* files and try again:

[root@nico ~]# yum clean all
rpmdb: Thread/process 29404/139880514733824 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
[root@nico ~]# rm -f /var/lib/rpm/__db*
[root@nico ~]# yum clean all
Loaded plugins: downloadonly, fastestmirror, replace
Cleaning repos: base drivesrvr epel extras ius newrelic percona-release-noarch percona-release-x86_64 rackspace updates webtatic
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@nico ~]# yum clean all
Loaded plugins: downloadonly, fastestmirror, replace
Cleaning repos: base drivesrvr epel extras ius newrelic percona-release-noarch percona-release-x86_64 rackspace updates webtatic
Cleaning up Everything
[root@nico ~]#

Update 3:

I tailed /var/log/messages and saw a lot of output when I ran yum-complete-transaction, the last two lines of which were:

Nov 14 08:19:47 nico kernel: Out of memory: Kill process 30995 (yum-complete-tr) score 149 or sacrifice child
Nov 14 08:19:47 nico kernel: Killed process 30995, UID 0, (yum-complete-tr) total-vm:641952kB, anon-rss:181420kB, file-rss:4kB

So presumably this suggests it's memory related. If so, is this a case of needing more RAM, or could there be another problem I need to investigate?

2
  • 2
    Did you check your system logs? You may be running out of memory. Nov 14, 2014 at 8:05
  • Yeah, I've just updated the question (update 3) with memory info, I think you're right. Nov 14, 2014 at 8:24

5 Answers 5

7

Similar issue - and my fix. I had a problem with memory too, so had to upgrade the memory of the VPS. I then did a yum update - of course got the errors as above. So looked on the failed, and noticed what happen was that Yum installed (well, started to install) the latest coreutils - version 37, whereas I still had bits of 31. So first, removed version 37, then cleaned and then ran yum update again.

That caused the '31' version to be available to be "updated" cleanly. See the work below:

--> Running transaction check
---> Package coreutils.x86_64 0:8.4-31.el6_5.2 will be updated
--> Processing Dependency: coreutils = 8.4-31.el6_5.2 for package: coreutils-libs-8.4-31.el6_5.2.x86_64
---> Package coreutils.x86_64 0:8.4-37.el6 will be an update
--> Finished Dependency Resolution
Error: Package: coreutils-libs-8.4-31.el6_5.2.x86_64 (@updates)
           Requires: coreutils = 8.4-31.el6_5.2
           Removing: coreutils-8.4-31.el6_5.2.x86_64 (@updates)
               coreutils = 8.4-31.el6_5.2
           Updated By: coreutils-8.4-37.el6.x86_64 (base)
               coreutils = 8.4-37.el6
 You could try using --skip-broken to work around the problem

Running yum remove coreutils-libs-8.4-37.el6.x86_64:

Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package coreutils-libs.x86_64 0:8.4-37.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved
==============================
========================================================================================

Package                         Arch                    Version                    Repository                  Size
======================================================================================================================
Removing:
 coreutils-libs                  x86_64                  8.4-37.el6                  installed                  5.4 k

Transaction Summary
======================================================================================================================
Remove        1 Package(s)

Installed size: 5.4 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : coreutils-libs-8.4-37.el6.x86_64                                                                   1/1 
  Verifying  : coreutils-libs-8.4-37.el6.x86_64                                                                   1/1 

Removed:
  coreutils-libs.x86_64 0:8.4-37.el6                                                                                  

Complete!

Cleaning up using yum clean all:

Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors

Doing package list refresh yum update:

Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
 * base: mirrors.lga7.us.voxel.net
 * extras: mirrors.lga7.us.voxel.net
 * updates: mirror.cc.columbia.edu
base                                                                                           | 3.7 kB     00:00     
base/primary_db                                                                                | 4.6 MB     00:00     
extras                                                                                         | 3.4 kB     00:00     
extras/primary_db                                                                              |  30 kB     00:00     
updates                                                                                        | 3.4 kB     00:00     
updates/primary_db                                                                             | 1.5 MB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package coreutils.x86_64 0:8.4-31.el6_5.2 will be updated
---> Package coreutils.x86_64 0:8.4-37.el6 will be an update
---> Package coreutils-libs.x86_64 0:8.4-31.el6_5.2 will be updated
---> Package coreutils-libs.x86_64 0:8.4-37.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================
 Package                          Arch                     Version                       Repository              Size
======================================================================================================================
Updating:
 coreutils                        x86_64                   8.4-37.el6                    base                   3.0 M
 coreutils-libs                   x86_64                   8.4-37.el6                    base                    50 k

Transaction Summary
======================================================================================================================
Upgrade       2 Package(s)

Total download size: 3.1 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): coreutils-8.4-37.el6.x86_64.rpm                                                         | 3.0 MB     00:00     
(2/2): coreutils-libs-8.4-37.el6.x86_64.rpm                                                    |  50 kB     00:00     
----------------------------------------------------------------------------------------------------------------------
Total                                                                                  44 MB/s | 3.1 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : coreutils-libs-8.4-37.el6.x86_64                                                                   1/4 
  Updating   : coreutils-8.4-37.el6.x86_64                                                                        2/4 
  Cleanup    : coreutils-libs-8.4-31.el6_5.2.x86_64                                                               3/4 
  Cleanup    : coreutils-8.4-31.el6_5.2.x86_64                                                                    4/4 
  Verifying  : coreutils-8.4-37.el6.x86_64                                                                        1/4 
  Verifying  : coreutils-libs-8.4-37.el6.x86_64                                                                   2/4 
  Verifying  : coreutils-libs-8.4-31.el6_5.2.x86_64                                                               3/4 
  Verifying  : coreutils-8.4-31.el6_5.2.x86_64                                                                    4/4 

Updated:
  coreutils.x86_64 0:8.4-37.el6                           coreutils-libs.x86_64 0:8.4-37.el6                          

Complete!

-Sup.

11

The usual reason for yum dying with Killed is that the system ran out of memory.

From your logs it looks like you have an Amazon t1.micro instance, or something similarly sized, and without any swap space. This restricted amount of memory is often not enough to complete a large number of package installations/updates.

To resolve the problem, either:

  1. Shut down running services until you have enough memory to complete the yum transaction.

    Or...

  2. Add a swap file or swap on ephemeral storage to your instance.

Then you should be able to complete your yum transactions.


Finally, to clean up your package problems from your previous failed updates, try

package-cleanup --cleandupes

before you perform any other updates.

2
  • 1
    You might also take this opportunity to switch to a t2.micro instance, which has more memory, is usually faster, and is cheaper. Nov 14, 2014 at 8:57
  • Thankyou. It took stopping httpd but it's all worked, and cleaned up after too. Nov 14, 2014 at 9:11
2

Try $ yum update --skip-broken that will skip broken packages (you can deal with them later), probably good idea to run $ yum clean all before doing anything.

1

Filtering out the extraneous information you quoted and half way through yum already tries to help you:

There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them. The program yum-complete-transaction is found in the yum-utils package.

Did you already try that?

2
  • Yes actually I did. It told me it couldn't complete and had renamed the transaction files Nov 13, 2014 at 22:05
  • I have added more details to the question with examples of when things are failing. Nov 14, 2014 at 8:03
0

Try a

yum downgrade packagename

Not sure why but it updates, or at least it did for me with tcpdump package. Went from version tcpdump-4.5.1-2.el7.x86_64 to tcpdump-4.7.4-1_ESG_ring.x86_64 which is what I wanted.

You must log in to answer this question.

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