yum Import: No module named cElementTree

Asked

Viewed 198 times

0

I am trying to install a Microsoft server on my linux, but when trying to install yum started to present this error for all that is package

yum install scm-server
Plugins carregados: fastestmirror, protectbase
Configurando o processo de instalação
Loading mirror speeds from cached hostfile
 * base: centos.brnet.net.br
 * extras: centos.brnet.net.br
 * rpmforge: repoforge.xpg.com.br
 * updates: centos.brnet.net.br
 * webtatic: us-east.repo.webtatic.com
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 298, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 146, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 440, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 211, in doCommand
    return base.installPkgs(extcmds)
  File "/usr/share/yum-cli/cli.py", line 702, in installPkgs
    self.install(pattern=arg)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 3551, in install
    mypkgs = self.pkgSack.returnPackages(patterns=pats,
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 907, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 687, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 324, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1261, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1460, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1452, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1442, in _loadRepoXML
    return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1417, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1245, in _commonLoadRepoXML
    self._repoXML = self._parseRepoXML(result)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1041, in _parseRepoXML
    return repoMDObject.RepoMD(self.id, local)
  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 1155, in cElementTree_iterparse
    _cElementTree_import()
  File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1150, in _cElementTree_import
    import cElementTree
ImportError: No module named cElementTree

someone knows how to fix this???

I solved that in parts. I removed all files in the /usr/lib64/python2.6/

after that I downloaded the packets:
python-2.6.6-66.el6_8.x86_64. rpm
python-pysqlite-2.6.3-16.4.x86_64.rpm
python-devel-2.6.6-66.el6_8.x86_64. rpm
rpm-python-4.8.0-55.el6.x86_64.rpm
python-libs-2.6.6-66.el6_8.x86_64. rpm
sqlite-3.6.20-1.el6_7.2.x86_64.rpm
python-pycurl-7.19.0-9.el6.x86_64.rpm
yum-3.2.29-75.centos.noarch.rpm

yet now is giving error:

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   No module named sqlitecachec

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://yum.baseurl.org/wiki/Faq
  • tried running with "sudo yum install scm-server"?

  • I am already logged in as root

  • I found a guy in Serverfault who managed to resolve by python-elementtree manually: http://serverfault.com/questions/472960/how-to-fix-yum-error-no-module-named-celementtree You can try this.

  • my version of Centos eh 6.8. however I did not find this package in 6.8. ’s version 5 does not work

  • Tried searching for the package in the EPEL Positorios?

  • searching found that this package was added to the python standard. reinstalled the python packages so that it is giving another error

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.