Fedora 11 Upgrade Problems With YUM





I experienced some problems while trying to run the yum update command after upgrading from Fedora 10 to Fedora 11 on one of my servers. I observed the following error message:

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.
It’s possible that the above module doesn’t match the
current version of Python, which is
2.6 (r26:66714, Mar 17 2009, 11:44:21)
[GCC 4.4.0 20090313 (Red Hat 4.4.0-0.26)]

If you cannot solve this problem yourself, please go to
http://wiki.linux.duke.edu/YumFaq

After a bit of probing around with RPM, I discovered that the yum and yum-utils packages were still at the Fedora 10 versions which are apparently not compatible with Fedora 11. Because YUM was not working I could not use it to recover so I had to use the RPM command. This meant I had to manually work my way through the dependencies. Using the following command I was able to remove YUM and all of its dependencies:

rpm -e yum preupgrade createrepo PackageKit-yum-plugin anaconda-yum-plugins PackageKit-yum system-config-language yum-utils PackageKit gnome-packagekit PackageKit-glib PackageKit-qt kpackagekit PackageKit-gtk-module

Note that the command should be all one line when you issue it on your computer.

After installing the correct version of YUM from the installation DVD, performing the command yum check-update shows only a couple Fedora 10 packages which is clearly wrong. I then used the command yum clean all to resolve this and then YUM could correctly perform updates and installs. I suspect that running the yum clean all command before upgrading would have prevented this problem, even though I upgraded using the DVD.

So the upshot is that you should always run the yum clean all command prior to upgrading Fedora.





Leave a Reply