Fix for yum Error: Cannot retrieve repository metadata for repository


Can’t install new rpms using yum? Update won’t work? Chances are if you’re seeing the error message below, the repository files are not the problem.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again

It may be something easily overlooked – the dns resolver!

Check /etc/resolv.conf and make sure your dhcp server is supplying at least one line starting with “nameserver”. If your system uses dhclient, then /etc/resolv.conf should look something like this:

; generated by /sbin/dhclient-script
search domain.com
nameserver 192.168.0.1
nameserver 192.168.1.1

If that fixes it, the problem was in converting the host names in the repository files under /etc/yum.repos.d/ into IP addresses.


Posted on August 3rd, by admica in fedora, simple.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">