System Check doesn't fix Package Database

Hi All,

Because I was getting some package errors, I ran the Repair Installed System option that shows up after boot. During System Check when “Searching for package databases,” YaST2 is not able to find /var/lib/rpm/Filemd5s. After a while, a YaST2 box pops up and says that it “Successfully rebuilt the package database” but I get the same error when I run System Check again. I’ve chosen both “Rebuild Package Database” as well as “Revert to Original Package Database (saved by YaST)” In both cases, it says that it was successful, but the same error occurs the next time I run System Check.

Any ideas are most appreciated

Hi VFan. Can you tell us a bit more about the errors you are getting. Did this happen during a recent update?

This might be what you are experiencing

Online updates for 11. 2 and 11.0 Corrupted Yast and Zypper - openSUSE Forums

Thanks for the reply deano.

I don’t recall seeing the above message during the several online updates. I will say that during this past day, quite a large number of updates have been applied during several reboots and I’ve not noticed any errors. My error happens when I boot from a SUSE boot DVD and select “Repair Installed System.” From there I select

-> Customized Repair
--> Check Package Database

It then begins “Searching for package database” and comes up with the following error:

"The package database was check. The following files that belong to the package database were not found

/var/lib/rpm/Filemd5s"

At the “Repair Method” prompting I choose “Rebuild Package Database.” I then get the prompt “Rebuilding the package database” and then “Succesfully rebuilt the package database.” When I reboot a check the package database again, the exact same sequence occurs over again.

Things that I’ve tried:

  • Redefined partitions and reinstalled OS
  • burned a new boot disk from ISO and reinstalled
  • Re-downloaded an ISO from a different mirror and burned a new DVD, and then reinstalled

I’ve also have installed a couple of packaged applications and they install and run just fine without errors. The only time I’ve seen the error is when I check the package database through the “Customized Repair” options

Regards,
newby VFan

The only time I’ve seen the error is when I check the package database through the “Customized Repair” options

I don’t know why your getting that error, but if everything seems alright then I wouldn’t worry too much.

This is a good command to check installed packages to verify and fix any package dependencies or conflicts that may be present. You’ll need to be root first with ‘su -’ command

zypper ve

and this is a simple CLI way to repair a corrupt database

rpm --rebuilddb

but you’d only use this if your zypper or yast package manager were throwing errors.

OK, will do. Thanks for the reply.

Another point if you updated from repositories things may not match the versions on your disk. Basically you are going back to square one and must re-download any updates/fixes/patches.

Repair from the disk is a last ditch option.

gogalthorp, I think you might be indicating some packaging management behavior that I’m not aware of (BTW, I have no experience with package management). It was my assumption that if the package manager identifies some missing files that it will replace them during the rebuild process. In this case, I ran the check the same day I did the install so I was assuming that it would be reinstalling the package from the DVD I had loaded.

I’m interpreting you comments to imply that if the package is updated which changes the dependencies, the package rebuilder won’t overwrite those new dependencies. Am I interpreting your comments correctly?

Regards,
VFan

In general only the binaries ae updated. Any config files are in most cases left alone. That means if the error is in a config file it most likely will still be there.

In general again each user has their own set of configurations so config files reside somewhere in their home directory. One way to check is to create a new user and see if the problem is in that account also.

When you preform a repair only binaries and certain system config files are set back to day one and only those that are on the install media. So it would be normal for any updates to have to be reapplied. Any programs that are not on the install media are left alone.

If you do a new install the root partition is reformatted and all is et back to day one. You do have the option to preserve the data on the home partition. Just set the home partition not to format and mount as /home