How to Fix “Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again” Error When using Local DVD-ROM/CD-ROM Yum Repository on Fedora 16

Question :

I am using Local DVD-ROM/CD-ROM yum Repository on Fedora 16. But when i perform any yum command to install or update or remove the package/module, i get the following error :

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

Answer :
To fix the following error, follow this steps :

1. Create repo.disabled inside /etc/yum.repos.d :

[root@fedora16 ~]# mkdir /etc/yum.repos.d/repo.disabled

By default of minimal installation of Fedora 16 server, there are 3 file in /etc/yum.repos.d as below :

[root@fedora16 ~]# ls /etc/yum.repos.d/
fedora.repo  fedora-updates.repo  fedora-updates-testing.repo  repo.disabled

Note : repos.disabled is the folder that you created in step (1).

READ  How to Fix "Warning: RPMDB altered outside of yum."

2. Then moved all these 3 repo files into “repo.disabled” folder :

[root@fedora16 ~]# mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/repo.disabled
[root@fedora16 ~]# mv /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/repo.disabled
[root@fedora16 ~]# mv /etc/yum.repos.d/fedora-updates-testing.repo /etc/yum.repos.d/repo.disabled

3. Create files fedora16.repo under /etc/yum.repos.d and enter the following lines :

[root@fedora16 ~]# vi /etc/yum.repos.d/fedora16.repo

Enter these lines in fedora16.repo :

[Fedora16-Repository]
name=DVD-Fedora16 Repository
baseurl=file:///mnt
enabled=1
gpgcheck=0

Check What file and folder inside /etc/yum.repos.d :

[root@fedora16 ~]# ls -l /etc/yum.repos.d/
total 8
-rw-r--r--. 1 root root   92 Mar 18 00:09 fedora16.repo
drwxr-xr-x. 2 root root 4096 Mar 18 01:27 repo.disabled

4. Run yum clean all to clear up your yum cache directory :

[root@fedora16 ~]# yum clean all
Cleaning repos: Fedora16-Repository
Cleaning up Everything

5. Steps completed. You can start using yum command as usual.

Leave a Reply

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

SiteGround.com

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.

TRY FREE

* up to 30 days money back guarantee