yum、rpm db错误

错误信息

rpmdb: PANIC: fatal region error detected; run recovery

I began running this to remove amanda from my system

# yum remove amanda

Code:

....

Dependencies Resolved

 

=============================================================================

 Package                 Arch       Version          Repository        Size

=============================================================================

Removing:

 amanda                  i386       2.5.0p2-4        installed         390 k

Removing for dependencies:

 amanda-client           i386       2.5.0p2-4        installed         270 k

 amanda-server           i386       2.5.0p2-4        installed         1.1 M

 

Transaction Summary

=============================================================================

Install      0 Package(s)

Update       0 Package(s)

Remove       3 Package(s)

 

Is this ok [y/N]: y

Downloading Packages:

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Removing  : amanda-server                ######################### [1/3]

rpmdb: page 730: illegal page type or format

rpmdb: PANIC: Invalid argument

error: db4 error(-30977) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery

error: error(-30977) setting "on+���c=-

                                         @m

" records from Filemd5s index

rpmdb: PANIC: fatal region error detected; run recovery

error: db4 error(-30977) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery

error: error(-30977) setting ";b.#C+��.՘

                                          @m

" records from Filemd5s index

rpmdb: PANIC: fatal region error detected; run recovery

error: db4 error(-30977) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery

error: error(-30977) setting "$>И

                                    @m

After pages and pages of errors like that, I have a few more pages error looks like this:


Code:

rpmdb: PANIC: fatal region error detected; run recovery

error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery

rpmdb: PANIC: fatal region error detected; run recovery

error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery

rpmdb: PANIC: fatal region error detected; run recovery

error: db4 error(-30977) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery

rpmdb: PANIC: fatal region error detected; run recovery


So I thought I will try run:
# rpm --rebuilddb
or
# rpm -initdb

But both return:

Code:

rpmdb: PANIC: fatal region error detected; run recovery

error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery

error: cannot open Packages index using db3 -  (-30977)


Any thoughts? Is my rpm db completely broken now? what shall I do to fix it?

 

 

 

 

 

解决

rm /var/lib/rpm/__db*

rpm --rebuilddb

yum clean all

 

本文出自 “Linux Enthusiasts” 博客,谢绝转载!

你可能感兴趣的:(职场,rpm,yum,休闲,db报错)