From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i686) Description of problem: My Red Hat rpm v.4.0.2 got corrupted, how to fix it? 1 May 2000: Dear Red Hat Linux community, While deleting a whole set of kde foreign language rpm's using kpackage from my Intel Red Hat Linux 7.1 upgrade (running rpm v.4.0.2), the rpm database became corrupted. I have identified the particular rpm whose entry is corrupt, kde-i18n-German-2.1.1-2.noarch.rpm, but am unable to clear it by either installing or removing this package. Because the database is corrupted, any rpm command with the -a option crashes with a segmentation fault, as does the --rebuilddb option. Further, kpackage, gnorpm and up2date all crash when trying to open them. Does anyone have any ideas how to repair the rpm database? Thank you very much. Sincerely, Clifford Felder <clifford.felder.il> How reproducible: Always Steps to Reproduce: If I type any of the following commands: 1.rpm -qa OR 2.rpm -q kde-i18n-German-2.1.1-2 OR 3.rpm --rebuilddb"S 4.gnorpm OR 5.kpackage Actual Results: I get message "Segmentation fault" Expected Results: Expect to get, for each command: 1.Full list of installed rpm's 2.Status of the German rpm 3.A properly rebuilt rpm database 4. and 5.Program should open and display all my installed rpms. Additional info:
You have two problems. 1) The Packages database is corrupt. Verify by doing (you need the db3-utils package installed): cd /var/lib/rpm for i in [A-Z]* do echo $i ----- db_verify $i done where you will see ... db_verify: Overflow page 3108 of invalid type db_verify: Overflow page 3215 of invalid type db_verify: DB->verify: Packages: DB_VERIFY_BAD: Database verification failed ... You can fix this by doing (as root) cd /var/lib/rpm mv Packages Package.old db_dump Packages.old | db_load Packages 2) You are using a version of kpackage that is not linked with rpm-4.0.2. You have both db3 (e.g. Packages) and db1 (e.g. packages.rpm) files in /var/lib/rpm. You will need to reinstall the handful of packages in db1 format: Here's the package list that I see: bash$ rpm -qa rpm-4.0.2-8 rpm-devel-4.0.2-8 rpm-build-4.0.2-8 rpm-python-4.0.2-8 kdebase-2.1.1-8 kdelibs-2.1.1-5 kdelibs-devel-2.1.1-5 kdegraphics-2.1.1-1 kdeadmin-2.1.1-3 kde-i18n-German-2.1.1-2 You should rename (and eventually remove) all the db1 format files cd /var/lib/rpm mkdir DB1SAVE mv *.rpm DB1SAVE Reinstall all the above packages using rpm-4.0.2 from the command line. To prevent this from happening again, you will need to get a version of kpackage that is linked with rpm-4.0.2. Try the Red Hat 7.1 version, or rebuild whatever src rpm you wish against rpm-4.0.2 libraries.
From Clifford.Felder.il: above advice did not help I tried the two suggestions listed above, namely to rebuild the database via db_dump | db_load, to move the *.rpm out of /var/lib/rpm, and to replace all the listed rpm files listed manually, but it still did not help. The database is still corrupt. In addition, I was not able either to remove or re-install the kde-il8n-German rpm, it gave a 'segmentation fault'.
I need a reproducible failure if you wish me to look more. What are you trying to do exactly?