yum fails with the error : " ImportError: No module named cElementTree"

Solution Verified - Updated -

Issue

  • yum update fails with the error below:

    # yum update
    Plugin "refresh-packagekit" can't be imported
    Loaded plugins: rhnplugin, security
    Traceback (most recent call last):
      File "/usr/bin/yum", line 29, in <module>
        yummain.user_main(sys.argv[1:], exit_code=True)
    [...]
      File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1169, in cElementTree_iterparse
        _cElementTree_import()
      File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1164, in _cElementTree_import
        import cElementTree
    ImportError: No module named cElementTree
    
  • yum repolist fails with error below:

    # yum repolist
    Plugin "refresh-packagekit" can't be imported
    Loaded plugins: rhnplugin, security
    Traceback (most recent call last):
      File "/usr/bin/yum", line 29, in <module>
        yummain.user_main(sys.argv[1:], exit_code=True)
    [...]
      File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1169, in cElementTree_iterparse
        _cElementTree_import()
      File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1164, in _cElementTree_import
        import cElementTree
    ImportError: No module named cElementTree
    

Environment

  • Red Hat Enterprise Linux
  • Oracle Database configured on client

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content