yum on Centos stuck at "loaded plugins: fastestmirror"

Drew picture Drew · Jul 27, 2012 · Viewed 59.8k times · Source

When trying to install a package using yum on Centos, the command is getting stuck at the first part:

loaded plugins: fastestmirror

I've tried:

  1. removing /var/cache/yum/timedhosts.txt See suggestion
  2. yum update yum
  3. making sure there are no other processes running and removing /var/run/yum.pid
  4. yum clean all See suggestion
  5. Checked that DNS works for all the servers in the /etc/yum.repos.d/*.repo files
  6. Set the enabled flag in vi /etc/yum/pluginconf.d/fastestmirror.conf // enabled=0 See Suggestion

... still having the problem.

Any ideas?

Answer

Drew picture Drew · Jul 28, 2012

For me what ended up fixing it was this:

rm -f /var/lib/rpm/__*
rpm --rebuilddb -v -v

Then rerunning yum command I was trying to run in the first place.

It got stuck for about a minute on:

Determining fastest mirrors

...but then it completed without errors

Suggested Here