RPM : error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
Ok, was trying to update one of my servers today and encounter these funky error messages "error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery" while trying to update yum
sudo yum update
[sudo] password for manager:
rpmdb: Thread/process 19525/140269149038336 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
Attempt to fix this with database recovery command somehow did not work
rpm --rebuilddb
rpmdb: Thread/process 19525/140269149038336 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)
so proceed to check cd /var/lib/rpm
and see what's going on
ls -l
total 49248
-rw-r--r-- 1 root root 1548288 Jul 21 09:57 Basenames
-rw-r--r-- 1 root root 12288 Jul 21 09:57 Conflictname
-rw-r--r-- 1 root root 24576 Aug 7 18:07 __db.001 <----- files with __ are the lock files
-rw-r--r-- 1 root root 229376 Aug 7 18:07 __db.002
-rw-r--r-- 1 root root 1318912 Aug 7 18:07 __db.003
-rw-r--r-- 1 root root 753664 Aug 2 11:30 __db.004
-rw-r--r-- 1 root root 802816 Jul 21 09:57 Dirnames
-rw-r--r-- 1 root root 2605056 Jul 21 09:57 Filedigests
-rw-r--r-- 1 root root 12288 Jul 21 09:57 Group
-rw-r--r-- 1 root root 8192 Jul 21 09:57 Installtid
-rw-r--r-- 1 root root 24576 Jul 21 09:57 Name
-rw-r--r-- 1 root root 12288 Jul 21 09:57 Obsoletename
-rw-r--r-- 1 root root 40312832 Jul 21 09:57 Packages
-rw-r--r-- 1 root root 2576384 Jul 21 09:57 Providename
-rw-r--r-- 1 root root 1486848 Jul 21 09:57 Provideversion
-rw-r--r-- 1 root root 12288 Jul 5 2013 Pubkeys
-rw-r--r-- 1 root root 196608 Jul 21 09:57 Requirename
-rw-r--r-- 1 root root 90112 Jul 21 09:57 Requireversion
-rw-r--r-- 1 root root 45056 Jul 21 09:57 Sha1header
-rw-r--r-- 1 root root 24576 Jul 21 09:57 Sigmd5
-rw-r--r-- 1 root root 12288 Jul 21 09:57 Triggername
remove the unwanted files with rm -f __*
command
and bingo !
yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink | 14 kB 00:00
base: mirrors.loosefoot.com
epel: mirrors.kernel.org
Hope this tutorial can be useful for those having problem with yum update
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+11.1k Golang : Post data with url.Values{}
+13.4k Golang : Tutorial on loading GOB and PEM files
+13.7k Golang: Pad right or print ending(suffix) zero or spaces in fmt.Printf example
+7.2k Golang : Get YouTube playlist
+9.1k Golang : Launch Mac OS X Preview (or other OS) application from your program example
+45.9k Golang : Encode image to base64 example
+19.1k Golang : Get current URL example
+19.5k Golang : Convert(cast) bytes.Buffer or bytes.NewBuffer type to io.Reader
+20.9k Golang : How to get time zone and load different time zone?
+19.2k Golang : Example for DSA(Digital Signature Algorithm) package functions
+30.1k Get client IP Address in Go
+17.1k Golang : Linked list example