What do to? - Error: rpmdb open failed


since a few days, everytime I want to install something with dnf I get this message in the terminal

Fehler: sqlite failure: CREATE TABLE IF NOT EXISTS ‘Packages’ (hnum INTEGER PRIMARY KEY AUTOINCREMENT,blob BLOB NOT NULL): attempt to write a readonly database
Fehler: Packages-Index kann nicht mittels sqlite geöffnet werden - Datei oder Verzeichnis nicht gefunden (2)
Fehler: Paket-Datenbank in /var/lib/rpm kann nicht geöffnet werden
Fehler: Error: rpmdb open failed

That means, that I CAN’T use dnf without an error.
I tried as root with the same result and I couldn’t find any solution for my Fedora 33.
Hopefully here has somebody an answer

1 Like

Try rebuilding the RPM database:

1 Like

Thanks, I made a backup of the RPM folder and could use without errors the rebuilddb but now there are new errors when using dnf

Errors during downloading metadata for repository ‘fedora-modular’:


Looks like a different issue unrelated to the original problem.
You can temporarily comment out metalink and uncomment baseurl in the repo files.

1 Like

404 seems to be a mirror or connection issue.

LANG=c sudo dnf clean all

followed by

LANG=c sudo dnf update

looks like that the the computer wants to connect per IPv6. 404 means page not found.
Do you have IPv4 on?

@ florian
nach LANG=c sudo dnf clean all
I got the following message:
Failed to set locale, defaulting to C.UTF-8
Unable to detect release version (use ‘–releasever’ to specify release version)
85 files removed
Then wie LANG=c sudo dnf update the error from before appears again

@ liliklinux
I use IPv4 and IPv6

1 Like

So my locale is on de_DE.UTF-8 that looks good to me, but the 404 doesn’t disappear

Deactivate once IPv6 and see if it works. The 404 is with an IPv6 in the error message. If it works have a look if there is already a bug request. Maybe there is a workaround.

Only deactivating the IPv6 didn’t change much. But putting -y --releasever 33 at the end of the line did work. I don’t know how to make a workaround for that bc it is really annoying to put so much text at the end

I thank everone for the nice help. After a fresh start of my PC today I can use dnf without errors, even dragora works.


Sorry, this was supposed to be

LANG=C sudo dnf update

(capital ‘c’)

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