2013-02-15 34 views
1

在RHEL上運行yum時出現以下錯誤。基於我在谷歌上的搜索,它似乎與python有關。ImportError:沒有名爲cElementTree的模塊 - Redhat

任何人有任何想法?

 
Plugin "refresh-packagekit" can't be imported 
Loaded plugins: security 
Traceback (most recent call last): 
    File "/usr/bin/yum", line 29, in 
    yummain.user_main(sys.argv[1:], exit_code=True) 

...... 
........ 
........... 

    self.parse(srcfile) 
    File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 140, in parse 
    parser = iterparse(infile) 
    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 


回答

0

看看這個Bug 694812。我希望這會有所幫助。

+0

沒有,在這種情況下沒有幫助。 – ewwhite 2013-02-20 18:16:37

+0

如果您安裝了Oracle:http://serverfault.com/questions/482280/rhel-6-x-yum-gives-importerror-no-module-named-celementtree-errors – 2014-03-02 01:34:24

1

如果其紅帽企業版Linux 6.3

解決方案:

The libexpat.so.1 symlink links to libexpat.so.1.5.2 in /lib64/. But the directory was renamed to libexpat.so.1.old. Recreating the symlink with the correct name solved the issue:

​​
相關問題