Friday, March 20, 2009

error: can't create transaction lock on /var/lib/rpm/__db.000

I got the error message today while upgrading Webmin.  The fix for this is pretty simple:

rm -f /var/lib/rpm/__db.0*
rpm --rebuilddb

The first command clears out any of the files that will lock an RPM from running.  The second command rebuilds the RPM database.

Then I was able to install Webmin 1.470 from the RPM that I had downloaded with:
rpm -Uhv /Storage/rpmDownloads/webmin-1.470-1.noarch.rpm