yum update fails with Python Error – ImportError: No Module Named CElementTree


yum

You are trying to update Oracle Enterprise Linux and get a error similar like this.

[root@server2 ~]# yum update
Loaded plugins: 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/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/lib/python2.6/site-packages/yum/misc.py", line 1141, in cElementTree_iterparse
    _cElementTree_import()
  File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1136, in _cElementTree_import
    import cElementTree
ImportError: No module named cElementTree

One cause of this error is that you have set a Oracle Environment (for example to ASM to handle your RAC Cluster). When you unset the LD_LIBRARY_PATH which is pointing to the CRS or Oracle Home the yum command is working.

[root@server2 ~]# echo $LD_LIBRARY_PATH
/u01/app/12.1.0/grid/lib
[root@server2 ~]# unset LD_LIBRARY_PATH
[root@server2 ~]# yum update
Loaded plugins: security
repo id                                                    repo name                                                                                                           status
ol6_UEK_latest                                             Latest Unbreakable Enterprise Kernel for Oracle Linux 6Server (x86_64)                                                 239
ol6_latest                                                 Oracle Linux 6Server Latest (x86_64)                                                                                22.436
repolist: 22.675

Hope this helps

Advertisements

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s