当前位置:首页 » Linux技术知识

rpmdb: Thread died in Berkeley DB library

2018-05-11 08:22 本站整理 浏览(53)

通过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