One of the most annoying error that I have faced on Fedora is the yum error:
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
After a lot of googling and going through forums, I have made a list of solutions that can fix this problem.
-> Sometimes, you may face this error just after a fresh install. It can be fixed then by
yum clean all
yum clean metadata
yum clean dbcache
It can also be helpful even in the cases when yum was working just a few hours back and suddenly the problem rose and you have no idea why.
-> One of the most common fix is editing the fedora repo file. The fix is uncomment the baseurl line and comment the mirrorlist and then edit the /etc/hosts file adding
220.127.116.11 mirrors.fedoraproject.org 18.104.22.168 mirrors.rpmfusion.org
Well it’s is the most common fix. But, it has never helped me.
-> Another fix is disable the repo that causes this erro and then do the yum update. This was what I found in some forums but none of the solution-seekers were satisfied. One can though try this. It might be just as helpful.
-> Sometimes you may need to fix the rpm db. Type
rpm -vv –initdb
If one still gets an error, he can further do
rpm -f /var/lib/rpm/__db*
rpmdb -vv –rebuild
-> If behind a proxy, one may have forgotten to export the proxy settings. He can do so by
For permanent solution to text internet, one can create a proxy.[c]sh file in /etc/profile.d/ and type
and then log out and log in.
And for yum, add
to /etc/yum.conf and do the update.