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
+31.1k Golang : Interpolating or substituting variables in string examples
+6.3k Golang : Build new URL for named or registered route with Gorilla webtoolkit example
+24.1k Golang : Call function from another package
+6.7k Golang : Totalize or add-up an array or slice example
+14.5k Golang : Get uploaded file name or access uploaded files
+11.5k Golang : Intercept and process UNIX signals example
+18.5k Golang : How to get hour, minute, second from time?
+20.2k Golang : How to run your code only once with sync.Once object
+19.6k Golang : Fix cannot download, $GOPATH not set error
+13.8k Golang : Get user input until a command or receive a word to stop
+5.9k Javascript : How to replace HTML inside <div>?