RPM Database is empty after a "rpm --rebuilddb"
Mathias Nicolajsen Kjærgaard
mnk at mnk.dk
Tue Sep 14 21:03:18 UTC 2004
Hi all,
My system is FC2 with RPM version 4.3.1 (fully updated).
Yesterday when doing a couple of "yum list something*" queries I
suddenly got the following error from yum:
Traceback (most recent call last):
File "/usr/bin/yum", line 30, in ?
yummain.main(sys.argv[1:])
File "/usr/share/yum/yummain.py", line 163, in main
(log, errorlog, filelog, conf, cmds) = parseCmdArgs(args)
File "/usr/share/yum/yummain.py", line 75, in parseCmdArgs
conf=yumconf(configfile=yumconffile)
File "/usr/share/yum/config.py", line 155, in __init__
self.yumvar['releasever'] = self._getsysver()
File "/usr/share/yum/config.py", line 291, in _getsysver
hdr = idx.next()
StopIteration
After a little investigation I found out that this error was caused by a
corrupt rpm-database. To correct this I ran "rpm --rebuilddb".
Now the rpm command does not give any errors, but unfortunately the
rpm-database is now empty, e.g.:
[mnk at flanagan mnk]$ rpm -qa
[mnk at flanagan mnk]$ db_dump /var/lib/rpm/Packages
VERSION=3
format=bytevalue
type=hash
db_pagesize=4096
HEADER=END
DATA=END
[mnk at flanagan mnk]$
Yum still gives me the error shown above.
On Google I was able to find one similar incidence:
http://www.redhat.com/archives/fedora-list/2004-June/msg00284.html
He was lucky/wise since he had a backup of the database ... I don't :-(
Now my questions are:
- How could this happen in the first place - a bug in RPM?
- Is there any way that I can recover the information I have lost?
/Mathias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3701 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20040914/ffa6396a/attachment-0002.bin
More information about the users
mailing list