因为强制断开yum 安装的原因。
导致rpm yum 安装都无法使用。
报错如下:
➜ ~ rpm -ivh libtidy-5.4.0-1.el7.x86_64.rpm 错误:rpmdb: BDB0113 Thread/process 18174/140293920560960 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 打开软件包数据库 警告:libtidy-5.4.0-1.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID 352c64e5: NOKEY 错误:rpmdb: BDB0113 Thread/process 18174/140293920560960 failed: BDB1507 Thread died in Berkeley DB library 错误:db5 错误(-30973) 来自 dbenv->failchk:BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery 错误:无法从 /var/lib/rpm 打开软件包数据
解决办法:
按照如下步骤执行即可重建
# mkdir /var/lib/rpm/backup # cp -a /var/lib/rpm/__db* /var/lib/rpm/backup/ # rm -f /var/lib/rpm/__db.[0-9][0-9]* # rpm --quiet -qa # rpm --rebuilddb # yum clean all