PDA

View Full Version : yum broken?


abiko
2009-02-19, 09:28 AM CST
I'll be short with this one :)
After update manager told me that there are 186 updates for fedora 11 alpha, I've started to update the system.. Something broke :/
Now when using yum I get this error(s):

Loaded plugins: dellsysidplugin2, refresh-packagekit
rpmdb: Program version 4.7 doesn't match environment version 4.5
error: db4 error(-30971) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 - (-30971)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 301, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 155, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 188, in getOptionsConfig
self.conf
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 632, in <lambda>
conf = property(fget=lambda self: self._getConfig(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 227, in _getConfig
self._conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.6/site-packages/yum/config.py", line 772, in readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.6/site-packages/yum/config.py", line 842, in _getsysver
idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed

vallimar
2009-02-19, 11:03 AM CST
You upgraded the rpm packages. Between Alpha and Rawhide,
they made changes to rpm. Do the following:

cp -av /var/lib/rpm /var/lib/rpm.bak
rm -f /var/ilb/rpm/__db*
rpm -vv --rebuilddb

This will convert the old rpmdb to the newer format, using the newer db api.
Provided no errors were encountered, you can rm -rf /var/lib/rpm.bak
and proceed with your yum updates.

Also, yum seems to have an issue when updating the bash rpm.
I would advise not updating that along with others as you'll have a small mess
on your hands if yum breaks on you like it does me.

abiko
2009-02-19, 01:00 PM CST
Thank you on your help.
Now running the KPackageKit to see where did it stop in the update process..
Again, thank you! :)

matth45
2009-06-09, 02:20 PM CDT
Thank you! This was very helpful.

By the way, #2 should be

2. rm -f /var/lib/rpm/__db*