分类: 嵌入式
2010-07-23 10:56:46
rpmdb: fatal region error detected; run recovery
I got an odd error today when trying to upgrade webmin on one of our web servers. When rpm ran we got a pile of errors including the message "rpmdb: fatal region error detected; run recovery" .
Running rpm --rebuilddb produced the same error.
Anyway after much screwing around and useless searches in linux mail lists I found a liitle gem on the page "Repair a RPM database safely" on the site.
Basically it says:-
"hangs" in select are usually stale locks. Fix by doing
cd /var/lib/rpm
rm -f /var/lib/rpm/__db*
Turns out rpm --rebuilddb was failing due to an old lock file.