欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

rpmdb: Thread died in Berkeley DB library 博客分类: Linux linuxrpmBerkeley DBdatabase recovery 

程序员文章站 2024-03-12 10:48:14
...
通过rpm -ivh hadoop-hdfs-namenode-2.3.0+cdh5.0.0+548-1.cdh5.0.0.p0.69.el6.x86_64.rpm安装hadoop时,报下面错误:

rpmdb: Thread/process 37574/140114963916704 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
warning: hadoop-hdfs-namenode-2.3.0+cdh5.0.0+548-1.cdh5.0.0.p0.69.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID e8f86acd: NOKEY
rpmdb: Thread/process 37574/140114963916704 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 database in /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