yum stopped working


Recommended Posts

yum seemed to work fine a few days ago, but now when i run it i get the following error:

-> yum install blah

Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
rpmforge  : ####											   566/6611Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
	yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 94, in main
	result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 381, in doCommands
	return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 134, in doCommand
	return base.installPkgs(extcmds)
  File "/usr/share/yum-cli/cli.py", line 539, in installPkgs
	self.doRepoSetup()
  File "/usr/share/yum-cli/cli.py", line 109, in doRepoSetup
	self.doSackSetup(thisrepo=thisrepo)
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 338, in doSackSetup
	self.repos.populateSack(which=repos)
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 200, in populateSack
	sack.populate(repo, with, callback, cacheonly)
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 91, in populate
	dobj = repo.cacheHandler.getPrimary(xml, csum)
  File "/usr/lib/python2.4/site-packages/yum/sqlitecache.py", line 100, in getPrimary
	return self._getbase(location, checksum, 'primary')
  File "/usr/lib/python2.4/site-packages/yum/sqlitecache.py", line 93, in _getbase
	self.updateSqliteCache(db, parser, checksum, metadatatype)
  File "/usr/lib/python2.4/site-packages/yum/sqlitecache.py", line 368, in updateSqliteCache
	self.addPrimary(pkgId, package, cur)
  File "/usr/lib/python2.4/site-packages/yum/sqlitecache.py", line 257, in addPrimary
	pkgKey = self.insertHash('packages', PackageToDBAdapter(package), cur)
  File "/usr/lib/python2.4/site-packages/yum/sqlitecache.py", line 204, in insertHash
	values = hash.values()
  File "/usr/lib/python2.4/site-packages/yum/sqlitecache.py", line 459, in values
	out.append(self[k])
  File "/usr/lib/python2.4/site-packages/yum/sqlitecache.py", line 451, in __getitem__
	return self._pkg[self.NAME_MAPS.get(k, k)]
  File "/usr/lib/python2.4/site-packages/yum/mdparser.py", line 69, in __getitem__
	return self._p[k]
KeyError: 'epoch'

Does anyone know how to fix this? google didn't even seem to have any results for the search queries i used.

If it helps i'm using centOS 5

Thanks in advance for any help

t

Link to comment
Share on other sites

It is possible that a previous access (update/install/whatever) to the rpm database left it in a corrupted state.

There is a procedure to remove the corrupted files and rebuild the database up. I have done this twice before in my 5 years of Red Hat/Fedora because of me killing a session or what not. Here is a link that should help, if this is what the problem is:

http://www.rpm.org/hintskinks/repairdb/

Link to comment
Share on other sites

It is possible that a previous access (update/install/whatever) to the rpm database left it in a corrupted state.

There is a procedure to remove the corrupted files and rebuild the database up. I have done this twice before in my 5 years of Red Hat/Fedora because of me killing a session or what not. Here is a link that should help, if this is what the problem is:

http://www.rpm.org/hintskinks/repairdb/

I've just tried that, and it didn't seem to help (still getting the same error(s)), do you have any other thoughts on what could be causing it, or how to fix it?

thanks,

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.