RHEL 6.x - yum给出“ImportError:没有名为cElementTree的模块”错误

Modified on: Thu, 24 Oct 2019 05:00:02 +0800

我正在对一组150台服务器进行一系列更改。所有系统都能够通过yum成功下载和安装一组特定的RPM,除了一个。一个这个特殊的系统,所有yum命令都在“clean”之外转储到屏幕上:

[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

我试过了:

  • yum clean
  • 通过RPM手动重新安装零碎... expatpython的一部分等。
  • 重建RPM数据库

有什么想法吗?

作者:,ewwhite

最佳答案

修复:

显然,此系统上的Oracle安装将Oracle的路径注入LD_LIBRARY_PATH ...

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

取消设置变量允许yum再次正常运行。

作者:ewwhite

相关问答

添加新评论