2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[環境構築] rpmdb: PANIC: fatal region error detected が出たら。

Posted at

エラー

vagrant(centos64)にyumで色々入れていたら、こんな感じのエラーが出ました。

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

対応

$ sudo rpm --rebuilddb

これでも直らない時は、対象dbを削除します。

$ cd /var/lib/rpm/
$ mv __db.001 /tmp/ #バックアップを取ってもいい
$ sudo rm -rf __db.001 __db.002 __db.003

以下のようなコマンドで、エラーが出ず、うまく出力されたらOK。

# rpm -qa
# yum list
2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?