Skrevet av Emne: Linux: After upgrading from CentOS 4.7 to CentOS 5.2, yum no longer works  (Lest 4343 ganger)

ATC

  • Gjest
$ yum update
Loading "priorities" plugin
Plugin "fastestmirror" uses deprecated constant TYPE_INTERFACE.
Please use TYPE_INTERACTIVE instead.
Loading "fastestmirror" plugin
Determining fastest mirrors
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 105, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 289, in doCommands
    self._getTs()
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 85, in _getTs
    self._getTsInfo()
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 91, in _getTsInfo
    self._tsInfo.setDatabases(self.rpmdb, self.pkgSack)
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 537, in
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 392, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 214, in populateSack
    self.doSetup()
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 66, in doSetup
    self.ayum.plugins.run('postreposetup')
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 169, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/fastestmirror.py", line 78, in postreposetup_hook
    repo.set('urls', repomirrors[str(repo)])
AttributeError: 'YumRepository' object has no attribute 'set'



ATC

  • Gjest
The plugin "yum-plugin-fastestmirror" is incompatible with the yum that ships with CentOS 5. Remove and replace with the new "yum-fastestmirror" package:

$ yum --noplugins update yum
$ rpm -e yum-plugin-fastestmirror
$ yum install yum-fastestmirror