Hello,
while doing some maintenance on a Centos 4.4 box, I ran rpm -qa --last and got:
error: rpmdb: damaged header #91 retrieved -- skipping. ...lots of lines identical to the one above and finally:
the_last_package_I_installed_yesterday.rpm all the other rpms in reverse installation order
I've seen via google that this should mean there is a damaged rpm database and it should be rebuilt with one or two command, however:
1) how can I find out _why_ the damage happened? 2) what are the right command and options to restore the database?
The examples I've found are 5+ years old, so I'm not really inclined to run them as they are.
TIA, Marco
1) This could be anything. From file system corruption, to a bug.
2) rpm --rebuilddb will do what you need.
-- Steven Haigh
Email: netwiz@crc.id.au Web: http://www.crc.id.au Phone: (03) 9001 6090 - 0412 935 897
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of M. Fioretti Sent: Saturday, October 06, 2007 8:27 PM To: centos@centos.org Subject: [CentOS] Damaged rpm database?
Hello,
while doing some maintenance on a Centos 4.4 box, I ran rpm -qa --last and got:
error: rpmdb: damaged header #91 retrieved -- skipping. ...lots of lines identical to the one above and finally:
the_last_package_I_installed_yesterday.rpm all the other rpms in reverse installation order
I've seen via google that this should mean there is a damaged rpm database and it should be rebuilt with one or two command, however:
1) how can I find out _why_ the damage happened? 2) what are the right command and options to restore the database?
The examples I've found are 5+ years old, so I'm not really inclined to run them as they are.
TIA, Marco _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 10/6/07, Steven Haigh netwiz@crc.id.au wrote:
- rpm –-rebuilddb will do what you need.
Run this command with lots of caution. Take a look at this page:
http://www.oldrpm.org/hintskinks/repairdb/
and try a step-by-step repair procedure.
Akemi
On Sat, Oct 06, 2007 04:24:35 AM -0700, Akemi Yagi (amyagi@gmail.com) wrote:
On 10/6/07, Steven Haigh netwiz@crc.id.au wrote:
- rpm --rebuilddb will do what you need.
Run this command with lots of caution. Take a look at this page:
http://www.oldrpm.org/hintskinks/repairdb/
and try a step-by-step repair procedure.
In my case, these two commands seem to have restored things without problems:
rm -f /var/lib/rpm/__db* rpm -vv --rebuilddb
meaning that now, rpm -qa --last doesn't give anymore any error. Should I run some other check before officially declaring the problem solved?
Thanks, Marco
On 10/6/07, M. Fioretti mfioretti@nexaima.net wrote:
On Sat, Oct 06, 2007 04:24:35 AM -0700, Akemi Yagi (amyagi@gmail.com) wrote:
On 10/6/07, Steven Haigh netwiz@crc.id.au wrote:
- rpm --rebuilddb will do what you need.
Run this command with lots of caution. Take a look at this page:
http://www.oldrpm.org/hintskinks/repairdb/
and try a step-by-step repair procedure.
In my case, these two commands seem to have restored things without problems:
rm -f /var/lib/rpm/__db* rpm -vv --rebuilddb
meaning that now, rpm -qa --last doesn't give anymore any error. Should I run some other check before officially declaring the problem solved?
Thanks, Marco
If the rebuilding process went through without any problem, it is likely that you have repaired the rpm database successfully.
Akemi