红联Linux门户
Linux帮助

Linux下使用yum提示Error: rpmdb open failed

发布时间:2016-12-16 09:56:53来源:linux网站作者:一个会码代码也会作诗
用yum安装时提示:
rpmdb: Thread/process 23317/139897112413952 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  
 
原因是RPM数据库被破坏。
 
解决方法:重建数据库后恢复正常。
Shell:
cd /var/lib/rpm/
for i in `ls | grep 'db.'`;do mv $i $i.bak;done  
rpm --rebuilddb  
yum clean all
 
本文永久更新地址:http://www.linuxdiyf.com/linux/26945.html