Yesterday i upgraded my F35 (gnome) to F36 using dnf system-upgrade. All went smoothly, and my system seems to be working perfectly. But when i tried to run “sudo rpm --rebuilddb” as recommended in the system upgrade docs, I got the following error:
error: failed to replace old database with new database! error: replace files in /usr/lib/sysimage/rpm with files from /usr/lib/sysimage/rpmrebuilddb.4616 to recover
I tried replacing the files as instructed, and running rpm rebuilddb again but this resulted with the same error message just with a different folder name (rpmrebuilddb.xxxx)
As i said, I seem to have no problems with my fedora installation. If I didn’t try to rebuild rpm db, I would now be perfectly content with my system. But now that I’m receiving this error, which I couldn’t get rid of, despite googling it and trying some rare recommendations, I intend to do a fresh install, which I really don’t want to.
Does anybody have a solution? Thanks a lot in advance.
Hello @aparlak ,
The error indicates how to recover.
There should be a directory /usr/lib/sysimage/rpmrebuilddb.4616
That contains files you would copy over to this directory /usr/lib/sysimage/rpm
So you should be able to copy them over with sudo cp /usr/lib/sysimage/rpmrebuilddb.4616/* /usr/lib/sysimage/rpm/
Hope that helps.
Thanks for replying. I already did copy the files as suggested. After copying I tried to run sudo rpm -vv --rebuilddb again, to see if the problem went away; unfortunately no… I continue receiving the same error.
Thanks for the tip.
I checked the timeshift image I made before upgrading. In the backup, /var/lib/rpm contains rpm database files. /usr/lib/sysimage is empty in the backup. (I don’t know if the directory was really empty or timeshift just skipped them)
Currently (after the F36 upgrade) /var/lib/rpm is just a symlink to /usr/lib/sysimage/rpm
I desperately tried copying the db files in the backup to /usr/lib/sysimage/rpm but didn’t help