Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm making a set of changes to a group of 150 servers. All systems were able to successfully download and install a specific set of RPM's via yum, except for one. One this particular system, all yum commands outside of "clean" dump the following to the screen:

[root@dev1v ~]# yum install sssd
Loaded plugins: rhnplugin
/usr/lib64/python2.6/xmlrpclib.py:612: DeprecationWarning: The xmllib module is obsolete.  Use xml.sax instead.
  import xmllib # lazy subclassing (!)
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 285, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 136, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 434, in doCommands
    self._getTs(needTsRemove)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
    self._getTsInfo(remove_only)
  .
  .
  .
  File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 124, in __init__
    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

I've tried:

  • yum clean
  • reinstalling bits and pieces manually via RPM... expat, part of python, etc.
  • rebuilding the RPM database

Any thoughts?

share|improve this question

3 Answers 3

up vote 6 down vote accepted

The fix:

Apparently, the Oracle installation on this system injected Oracle's path into LD_LIBRARY_PATH...

[root@dev1v etc]# export 
declare -x LD_LIBRARY_PATH="/home/oracle/app/oracle/product/11.2.0/client_1/lib"

Unsetting the variable allowed yum to function properly again.

share|improve this answer

Hmm, in python 2.6, cElementTree lives in /usr/lib64/python2.6/xml/etree/cElementTree.py, which is part of the python package. The fact that you're reaching the import cElementTree in the yum code indicates that xml.etree seems missing.

Try reinstalling python by manually downloading the rpm and using rpm -Uvh.

If that doesn't work, what happens if you import xml.etree.cElementTree in a python shell? What does rpm --verify python say?

share|improve this answer

I have also seen someone causing this issue by putting Oracle's lib/ path in /etc/ld.so.conf.d

Using:

echo /opt/oracle/app/product/11.2.0/dbhome_1/lib/ > /etc/ld.so.conf.d/oracle.conf

Solved this issue by removing /etc/ld.so.conf.d/oracle.conf.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.