rpmdb报错
在安装tpcc-mysql时候,报错
[root@mha_backup /root] #rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm Retrieving http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm warning: /var/tmp/rpm-tmp.BiyV92: Header V3 DSA/SHA1 Signature, key ID 217521f6: NOKEY Preparing... ########################################### [100%] 1:epel-release ########################################### [100%] rpmdb: page 166: illegal page type or format rpmdb: PANIC: Invalid argument rpmdb: Providename: pgin failed for page 166 error: db3 error(-30974) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery error: error(-30974) getting "epel-release" records from Providename index rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30974) from dbcursor->c_close: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30974) from db->sync: DB_RUNRECOVERY: Fatal error, run database recovery rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30974) from db_create: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Conflictname index using db3 - (-30974)
这导致yum和rpm命名一直报错
#yum install bzr rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30974) from dbenv->open: 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
解决办法:
[root@mha_backup /root] #rm -f /var/lib/rpm/__db* [root@mha_backup /root] #rpm --rebuilddb [root@mha_backup /root] #yum clean all
恢复正常。
这是由于rpm在更新时候冲突导致的。
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。