Yum Cannot Retrieve Repository CentOS 6

27,236

Solution 1

I had a similar problem. All I did was renew my dhcp (dhcp -r) and it worked. I noticed the contents of /etc/resolv.conf had been changed.

Solution 2

Once you run yum clean all, try running yum makecache. Also check which repositories are enabled now (not that conf files could be goofed up) yum repolist

Share:
27,236
THE DOCTOR
Author by

THE DOCTOR

Updated on September 18, 2022

Comments

  • THE DOCTOR
    THE DOCTOR over 1 year

    I just installed CentOS 6. I tried running yum update and was having trouble getting that to work, so I tried yum clean all and now my situation seems even worse than before. Based upon what I pasted below, can someone please help me fix my yum repository? Thanks.

    [root@zedo-pc 1234]# yum update
    Loaded plugins: fastestmirror, refresh-packagekit
    Loading mirror speeds from cached hostfile
     * base: mirror.7x24web.net
     * extras: mirror.linux.duke.edu
     * updates: mirror.lug.udel.edu
    Error: no such table: packages
    
    [root@zedo-pc 1234]# yum clean all
    Loaded plugins: fastestmirror, refresh-packagekit
    Cleaning up Everything
    Cleaning up list of fastest mirrors
    
    [root@zedo-pc 1234]# yum update
    Loaded plugins: fastestmirror, refresh-packagekit
    Determining fastest mirrors
     * base: mirror.lug.udel.edu
     * extras: mirror.symnds.com
     * updates: mirror.rackspace.com
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia. Please verify its path and try again
    
    • Admin
      Admin over 12 years
      Please include the Yum repository file. Just a hunch though, but each time you run yum, you get a different mirror. Maybe there are a few bad/misconfigured mirrors in there? How many times have you ran it? Also, you should be able to reach those mirrors via http. Can you try plugging them into your web browser?
    • Admin
      Admin over 12 years
      Have you verified that both Internet (read networking) connectivity and name resolution are working properly?
    • Admin
      Admin over 12 years
      Where is the yum repository file you speak of located? It seems that the mirrors changed as a result of me running yum clean all.
    • Admin
      Admin over 12 years
      @SpacemanSpiff - I'm not quite sure what you are suggesting that I check. Could you please be more specific?
    • Admin
      Admin over 12 years
      Perhaps you could post the content of /etc/yum.conf, or the output of ls /etc/yum.repos.d. Another handy thing would be to mention any proxy setup etc you use.
  • Nikhil Mulley
    Nikhil Mulley over 12 years
    >>Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia. Please verify its path and try again This definitely looks a goofup in the configuration file to me. Identify the rogue configuration file with pattern /installmedia/i