Skip to content

Heart in mouth

This is how Linux keeps you on your toes. I did a “yum update” on my system, and after that yum stopped working. Ouch. The error I was getting was this:

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

No module named cElementTree

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.4.3 (#1, Jun 13 2006, 11:46:08)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)]

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

Thankfully, after a little Googling, I found the solution. First, you erase the following packages: pyhton-elementtree and yum (and if you have pirut installed, that too since it depends on yum):
rpm -e yum pirut python-elementtree

Then download the following packages: yum-2.6.0-1.noarch.rpm and python-elementtree-1.2.6-4.2.1.i386.rpm (I got them from here) and install them using:
rpm -ivh yum-2.6.0-1.noarch.rpm python-elementtree-1.2.6-4.2.1.i386.rpm

And yum is up and running again. Phew.

Oh and you might want to add the following line under the [main] section of /etc/yum.conf for now:
exclude=python-elementtree

to make sure another yum update does not break itself.

4 Comments