Rpmdb: damaged header

I’m receiving these error messages while updating. Also cannot rpm --rebuilddb.
Can you please tell me what’s wrong and maybe how to fix this one?
This one could coincide with this one: https://discussion.fedoraproject.org/t/fedora-32-loading-nouveau-and-not-nvidia-drivers/7802/6
(the main issue is that F33 is not working with the secondary display after latest automatical update - driver nVidia 3:460.39-1.fc33).

# dnf update --best --allowerasing

warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
error: rpmdb: damaged header #5862 retrieved -- skipping.
error: rpmdb: damaged header #5854 retrieved -- skipping.
Last metadata expiration check: 0:30:38 ago on Wed 10 Feb 2021 01:52:04 PM CET.
Dependencies resolved.
Nothing to do.

# mv /var/lib/rpm/__db.00* /tmp
# rpm --rebuilddb
warning: Converting database from bdb to sqlite backend
error: cannot open Packages index using bdb - Permission denied (13)

Also tried this guide:

I’m not quite sure what’s going on there, but I’d suggest as next step to boot from a LiveCD, mount the filesystem and chroot into it, and run rebuilddb from there. (See below)

Did you upgrade from a previous Fedora release?
Fedora 33 should use SQLite by default:
Changes/Sqlite Rpmdb - Fedora Project Wiki

Yes, I did. And thanks for shedding some light on it.

1 Like

Wait, no, I think I’ve found it: 1898299 – [abrt] rpm: db_create(): rpm killed by SIGBUS

This is a side-effect of bug 1461313. Update to selinux-policy-3.14.6-30.fc33, run ‘restorecon -Rv /var/lib/rpm’ and then ‘rpmdb --rebuilddb’ to finish it all off.

1 Like

Thank you for that fast response. Will try to create a new bootable F33 USB stick.

I think you should be able to do the above (restorecon before rebuilddb) without resorting to a live cd. Although that would still be my next step if that doesn’t work, and it’s handy to have around anyway. :slight_smile:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.