When yum becomes unusable

1 minute read

I will add a memo in case yum becomes unusable.

  1. Another app is currently holding the yum lock; #

■ Error details

[root@study ~]#  yum install httpd
Loaded plugin:fastestmirror
Lock file/var/run/yum.pid exists:It is running separately as PID 1278.
Another app is currently holding the yum lock; waiting for it to exit...
Other applications: yum
memory:  48 M RSS (588 MB VSZ)
start: Mon Sep  7 09:37:03 2020 - 04:40 seconds passed
Status:trace/Stop, PID: 1278
Another app is currently holding the yum lock; waiting for it to exit...
Other applications: yum
memory:  48 M RSS (588 MB VSZ)
start: Mon Sep  7 09:37:03 2020 - 04:42 seconds have passed
Status:trace/Stop, PID: 1278
Another app is currently holding the yum lock; waiting for it to exit...

■ Countermeasures

kill -9 1278

rm -f /var/run/yum.pid

yum clean all

Even if the contents of [1.] are executed, the error of [2.] may be displayed.

2.Thread died in Berkeley DB library#

■ Error details

[root@study ~]# yum check-update
error: rpmdb: BDB0113 Thread/process 1278/140418154268480 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error (-30973) (dbenv->In failchk): BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error:Unable to open Packages index in db5-  (-30973)
error: /var/lib/Unable to open Package database at rpm.
CRITICAL:yum.main:

■ Countermeasures

rm -rf /var/lib/rpm/__db.00*

rpm --rebuilddb