0

Using 64-bit RHEL 6, receiving this error from Yum:

[root /]# yum install [package_name]

---Start Error---
<BR><BR>
Traceback (most recent call last):<BR>

       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 288, in user_main 
       errcode = main(args) 
       File "/usr/share/yum-cli/yummain.py", line 140, in main 
       result, resultmsgs = base.doCommands() 
       File "/usr/share/yum-cli/cli.py", line 436, 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/depsolve.py", line 110, in _getTsInfo 
       pkgSack = self.pkgSack 
       File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in <lambda> 
       pkgSack = property(fget=lambda self: self._getSacks(), 
       File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 669, in _getSacks 
       self.repos.populateSack(which=repos) 
       File "/usr/lib/python2.6/site-packages/yum/repos.py", line 308, in populateSack 
       sack.populate(repo, mdtype, callback, cacheonly) 
       File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 187, in populate 
       dobj = repo_cache_function(xml, csum) 
       File "/usr/lib64/python2.6/site-packages/sqlitecachec.py", line 46, in getPrimary 
       self.repoid)) 
    TypeError: Parsing primary.xml error: Start tag expected, '<' not found 


---End Error---

Just started today. Was working just fine a couple days ago. Haven't installed anything on this system since last use.

Have already rebuilt Python 2.6 and Yum 3.4.3. Still same errors as above. Any ideas?

Cyrus
  • 84,225
  • 14
  • 89
  • 153

2 Answers2

1

Clear the repo cache and rebuild it

yum clean all
yum update
UnX
  • 421
  • 3
  • 6
  • Tried that already. "_yum clean all_" succeeds, but "_yum update_" [after loading some repos] fails with error output above. – user3482347 Mar 31 '14 at 20:38
  • Check this http://www.ephur.net/search/typeerror+parsing+primary+xml+error+start+tag+expected+not+found/ – UnX Mar 31 '14 at 20:48
  • NOTE:Maybe you should move this thread to unix and linux forum. It looks like a distro issue. – UnX Mar 31 '14 at 20:54
  • Thanks for the "ephur" link. That appears to have worked. Only confusing part is... the file that I moved (rather than deleted) was placed there on March 15th. Why would it start barking now? Very confusing. – user3482347 Mar 31 '14 at 21:23
  • That link does not work. Maybe it is this one http://www.ephur.net/index.php?s=yum+xml+start+tag – aalku Jun 03 '14 at 10:57
  • That link was posted 3 months ago, links are not eternal unfortunately, I had found it searching on google :) – UnX Jun 05 '14 at 16:48
  • @rMistero Then please share what you found for others. – aalku Aug 22 '16 at 10:17
0

Run this:

sudo su
export LD_LIBRARY_PATH=/usr/lib64:/usr/local/lib
yum clean all
yum update yum

I think this fixes it. It worked for me.

aalku
  • 2,860
  • 2
  • 23
  • 44