[root@test ~]# yum --help
错误:rpmdb: BDB0113 Thread/process 40830/140718463485760 failed: BDB1507 Thread died in Berkeley DB library
错误:db5 错误(-30973) 来自 dbenv->failchk:BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
错误:无法使用 db5 - (-30973) 打开 Packages 索引
错误:无法从 /var/lib/rpm 打开软件包数据库
CRITICAL:yum.main:
Error: rpmdb open failed
因为我强制kill掉了yum进程,导致 rpm 数据库 损坏,重新rebuild
[root@test ~]# cd /var/lib/rpm
[root@test rpm]# ll
总用量 109052
-rw-r--r--. 1 root root 1921024 3月 27 22:05 Basenames
-rw-r--r--. 1 root root 8192 3月 27 22:05 Conflictname
-rw-r--r--. 1 root root 286720 3月 31 15:20 __db.001
-rw-r--r--. 1 root root 90112 3月 31 15:20 __db.002
-rw-r--r--. 1 root root 1318912 3月 31 15:20 __db.003
-rw-r--r--. 1 root root 708608 3月 27 22:05 Dirnames
-rw-r--r--. 1 root root 16384 3月 27 22:05 Group
-rw-r--r--. 1 root root 16384 3月 27 22:05 Installtid
-rw-r--r--. 1 root root 24576 3月 27 22:05 Name
-rw-r--r--. 1 root root 16384 3月 27 22:05 Obsoletename
-rw-r--r--. 1 root root 105144320 3月 27 22:05 Packages
-rw-r--r--. 1 root root 1970176 3月 27 22:05 Providename
-rw-r--r--. 1 root root 176128 3月 27 22:05 Requirename
-rw-r--r--. 1 root root 53248 3月 27 22:05 Sha1header
-rw-r--r--. 1 root root 36864 3月 27 22:05 Sigmd5
-rw-r--r--. 1 root root 8192 3月 27 22:05 Triggername
[root@test rpm]# rm -rf _db.*
[root@test rpm]# rpm --rebuilddb
[root@test rpm]# ll
总用量 85452
-rw-r--r--. 1 root root 1916928 3月 31 15:23 Basenames
-rw-r--r--. 1 root root 8192 3月 31 15:23 Conflictname
-rw-r--r--. 1 root root 679936 3月 31 15:23 Dirnames
-rw-r--r--. 1 root root 8192 3月 31 15:23 Group
-rw-r--r--. 1 root root 16384 3月 31 15:23 Installtid
-rw-r--r--. 1 root root 24576 3月 31 15:23 Name
-rw-r--r--. 1 root root 16384 3月 31 15:23 Obsoletename
-rw-r--r--. 1 root root 79810560 3月 31 15:23 Packages
-rw-r--r--. 1 root root 1982464 3月 31 15:23 Providename
-rw-r--r--. 1 root root 155648 3月 31 15:23 Requirename
-rw-r--r--. 1 root root 49152 3月 31 15:23 Sha1header
-rw-r--r--. 1 root root 24576 3月 31 15:23 Sigmd5
-rw-r--r--. 1 root root 8192 3月 31 15:23 Triggername
[root@test rpm]# yum
[root@test rpm]# ll
总用量 82992
-rw-r--r--. 1 root root 1916928 3月 31 15:23 Basenames
-rw-r--r--. 1 root root 8192 3月 31 15:23 Conflictname
-rw-r--r--. 1 root root 286720 3月 31 15:23 __db.001
-rw-r--r--. 1 root root 90112 3月 31 15:23 __db.002
-rw-r--r--. 1 root root 57344 3月 31 15:23 __db.003
-rw-r--r--. 1 root root 679936 3月 31 15:23 Dirnames
-rw-r--r--. 1 root root 8192 3月 31 15:23 Group
-rw-r--r--. 1 root root 16384 3月 31 15:23 Installtid
-rw-r--r--. 1 root root 24576 3月 31 15:23 Name
-rw-r--r--. 1 root root 16384 3月 31 15:23 Obsoletename
-rw-r--r--. 1 root root 79810560 3月 31 15:23 Packages
-rw-r--r--. 1 root root 1982464 3月 31 15:23 Providename
-rw-r--r--. 1 root root 155648 3月 31 15:23 Requirename
-rw-r--r--. 1 root root 49152 3月 31 15:23 Sha1header
-rw-r--r--. 1 root root 24576 3月 31 15:23 Sigmd5
-rw-r--r--. 1 root root 8192 3月 31 15:23 Triggername
就OK啦