Linux - error: cannot open Packages database in /var/lib/rpm

Posted 程序员牧码

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux - error: cannot open Packages database in /var/lib/rpm相关的知识,希望对你有一定的参考价值。

报错信息

[root@VM_0_17_centos rabbitmq]# yum install xxx.rpm 
error: rpmdb: BDB0113 Thread/process 27590/140471762446144 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

解决方案

[root@VM_0_17_centos]# cd /var/lib/rpm
[root@VM_0_17_centos rpm]# ls
Basenames  Conflictname  __db.001  __db.002  __db.003  Dirnames  Group  Installtid  Name  Obsoletename  Packages  Providename  Requirename  Sha1header  Sigmd5  Triggername
[root@VM_0_17_centos rpm]# rm -rf __db*
[root@VM_0_17_centos rpm]# rpm --rebuilddb

以上是关于Linux - error: cannot open Packages database in /var/lib/rpm的主要内容,如果未能解决你的问题,请参考以下文章

Linux - error: cannot open Packages database in /var/lib/rpm

Linux - error: cannot open Packages database in /var/lib/rpm

Linux关于yum命令Error: Cannot retrieve repository metadata (repomd.xml) for repository:xxxxxx.

nested exception is java.io.FileNotFoundException: class path resource [springmvc.xml] cannot be ope

nested exception is java.io.FileNotFoundException: class path resource [springmvc.xml] cannot be ope

lGrub error:Cannot mount selected partition linux启