标签:rpmdb: panic: fatal region error detected;
[hadoop@master ~]$ sudo rpm -ivh MySQL-server-5.6.20-1.el6.x86_64.rpm rpmdb: PANIC: fatal region error detected; run recovery
安装mysql时候,提示rpmdb错误。google了一下centos的KB,解决思路如下:
需要清除rpm的database,保险起见,将/var/lib/rpm目录下的数据做个备份到/home/tmp里
[hadoop@master /]$ ls -l /var/lib/rpm/_* -rw-r--r-- 1 root root 24576 Aug 22 00:13 /var/lib/rpm/__db.001 -rw-r--r-- 1 root root 229376 Aug 22 00:13 /var/lib/rpm/__db.002 -rw-r--r-- 1 root root 1318912 Aug 22 00:13 /var/lib/rpm/__db.003 -rw-r--r-- 1 root root 753664 Aug 22 00:13 /var/lib/rpm/__db.004 [hadoop@master home]$ sudo ls -l /var/lib/rpm/_* -rw-r--r-- 1 root root 24576 Aug 22 00:13 /var/lib/rpm/__db.001 -rw-r--r-- 1 root root 229376 Aug 22 00:13 /var/lib/rpm/__db.002 -rw-r--r-- 1 root root 1318912 Aug 22 00:13 /var/lib/rpm/__db.003 -rw-r--r-- 1 root root 753664 Aug 22 00:13 /var/lib/rpm/__db.004 [hadoop@master home]$ sudo cp -avr /var/lib/rpm/ /home/tmp/
接着开始清理rmp db,如下
[hadoop@master ~]$ sudo ls -l /var/lib/rpm/_* -rw-r--r-- 1 root root 24576 Aug 22 00:13 /var/lib/rpm/__db.001 -rw-r--r-- 1 root root 229376 Aug 22 00:13 /var/lib/rpm/__db.002 -rw-r--r-- 1 root root 1318912 Aug 22 00:13 /var/lib/rpm/__db.003 -rw-r--r-- 1 root root 753664 Aug 22 00:13 /var/lib/rpm/__db.004 [hadoop@master ~]$ sudo rm -f /var/lib/rpm/_* [hadoop@master ~]$ sudo ls -l /var/lib/rpm/_* ls: cannot access /var/lib/rpm/_*: No such file or directory [hadoop@master ~]$ sudo db_verify /var/lib/rpm/Packages db_verify: Page 7709: overflow page of invalid type 13 db_verify: Page 3828: page 6681 encountered a second time on free list db_verify: /var/lib/rpm/Packages: DB_VERIFY_BAD: Database verification failed [hadoop@master ~]$ sudo rpm --rebuilddb error: rpmdbNextIterator: skipping h# 622 blob size(3816): BAD, 8 + 16 * il(0) + dl(0) error: rpmdbNextIterator: skipping h# 622 blob size(3816): BAD, 8 + 16 * il(0) + dl(0) [hadoop@master ~]$ sudo yum clean all [hadoop@master ~]$ sudo yum update #此处省去更新内容# Total download size: 209 M Is this ok [y/N]: y #下载包并安装#
看过程这里把所有的包都又重装然后clean了一遍。但是rpm和yum功能也就正常了
本文出自 “The old artisan” 博客,转载请与作者联系!
Linux排错:rpmdb: PANIC: fatal region error detected; run recovery
标签:rpmdb: panic: fatal region error detected;
原文地址:http://ciscolang.blog.51cto.com/8976580/1543465