Skip to content


YUM error on CentOS 5

I have a VPS running CentOS 5 and I was always running yum to update its software. This went ok until few days ago when “yum update” brought 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:
~~~~~~

If you cannot solve this problem yourself, please go to
the yum faq at:

http://wiki.linux.duke.edu/YumFaq

After around an hour I saw that an easy fix for the Python issue required gcc installed .. but it wasn’t installed :) so I searched for another solution, even simpler :

wget http://archives.fedoraproject.org/pub/archive/fedora/linux/core/6/i386/os/Fedora/RPMS/python-elementtree-1.2.6-5.i386.rpm

rpm -Uvh –oldpackage python-elementtree-1.2.6-5.i386.rpm

That fixed it! :D (the first thing to run was yum install gcc)

Hope this will help someone :)

Best wishes

Sorin

Posted in Linux Tips & Tricks.


3 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. puyeng says

    this is raw data, :)

    ————-
    # yum
    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, Sep 3 2009, 15:37:37)
    [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]

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

    # rpm -q python-elementtree
    python-elementtree-1.2.6-7.el4.rf

    # rpm -q –whatrequires python-elementtree
    yum-3.2.22-26.el5.centos

    # wget

    http://packages.sw.be/python-elementtree/python-elementtree-1.2.6-7.el5.test.x86_64.rpm
    –2010-07-27 03:46:33–

    http://packages.sw.be/python-elementtree/python-elementtree-1.2.6-7.el5.test.x86_64.rpm
    Resolving packages.sw.be… 85.13.226.40
    Connecting to packages.sw.be|85.13.226.40|:80… connected.
    HTTP request sent, awaiting response… 302 Found
    Location:

    http://rpmforge.sw.be/redhat/el5/en/x86_64/test/RPMS/python-elementtree-1.2.6-7.el5.test.

    x86_64.rpm [following]
    –2010-07-27 03:46:34–

    http://rpmforge.sw.be/redhat/el5/en/x86_64/test/RPMS/python-elementtree-1.2.6-7.el5.test.

    x86_64.rpm
    Resolving rpmforge.sw.be… 85.13.226.40
    Connecting to rpmforge.sw.be|85.13.226.40|:80… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: 103806 (101K) [application/x-rpm]
    Saving to: `python-elementtree-1.2.6-7.el5.test.x86_64.rpm’

    100%[======================================>] 103,806 41.5K/s in 2.4s

    2010-07-27 03:46:38 (41.5 KB/s) – `python-elementtree-1.2.6-7.el5.test.x86_64.rpm’ saved

    [103806/103806]

    # ls
    python-elementtree-1.2.6-7.el5.test.x86_64.rpm

    # rpm -Uvh python-elementtree-1.2.6-7.el5.test.x86_64.rpm

    Preparing… ########################################### [100%]
    1:python-elementtree ########################################### [100%]

    thats was easy :_
    ——————

  2. k says

    puyeng, you save me. thx so much!

  3. Sluchik says

    Thank you very much



Some HTML is OK

or, reply to this post via trackback.


Get Adobe Flash playerPlugin by wpburn.com wordpress themes