在安裝tpcc-mysql時候,報錯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命名一直報錯sql
#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
解決辦法:shell
[root@mha_backup /root] #rm -f /var/lib/rpm/__db* [root@mha_backup /root] #rpm --rebuilddb [root@mha_backup /root] #yum clean all
恢復正常。ide
這是因爲rpm在更新時候衝突致使的。
ui