Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)

Thursday, January 28, 2016

file:///mnt/repodata/repomd.xml - Yum error - RHEL

Yum Error:

[root@hrspwr ~]#  yum repolist

file:///mnt/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/repodata/repomd.xml
Trying other mirror.
repo id                                              repo name                                            status
cd                                                   cd                                                   0
cdha                                                 cd                                                   0
yum                                                  yum                                                  0
yum-update                                           yum-update                                           0
repolist: 0

The repolist shows value 0


Anwer:

In this case we are trying to get the yum repository from the repository server and not from the internet or DVD.


The just to check /edit whether you have proper entry in /etc/auto.master & /etc/auto.yum

[root@hrspwr ~]# cd /etc/yum.repos.d

[root@hrspwr yum.repos.d]# ls -lrt
total 8
-rw-r--r--. 1 root root 529 Oct 30  2013 rhel-source.repo
-rw-r--r--  1 root root 130 Nov 14 09:29 dvd.repo


[root@hrspwr yum.repos.d]# cat dvd.repo
[cd]
name = cd
baseurl = file:///mnt/
enabled = 1
gpgcheck = 0


[cdha]
name = cd
baseurl = file:///mnt/
enabled = 1
gpgcheck = 0

[root@hrspwr yum.repos.d]# vi dvd.repo

The enabled value should be 0, so it will not read the repository coming from DVD.

[root@hrspwr yum.repos.d]#  yum repolist

yum                                                                                      | 4.0 kB     00:00 ...
yum/primary_db                                                                           | 3.1 MB     00:02 ...
yum-update                                                                               | 3.0 kB     00:00 ...
yum-update/primary_db                                                                    |  14 MB     00:07 ...
repo id                                              repo name                                            status
yum                                                  yum                                                   3,585
yum-update                                           yum-update                                           15,533
repolist: 19,118


Now the repolist is showing value 19,118


Regards,
Kiran Jadhav



2 comments:

  1. Can u please mention the reason why this error occurs at the first place. I am facing the same problem and I am unable to understand. we have a repo server and then I have mounted it to /mnt directory now when I am applying yum repolist command it is giving me the same error.

    ReplyDelete
  2. After setting enabled to 0 in rhel7dvd.repo
    $ yum repolist shows following:
    Loaded plugins: product-id, search-disabled-repos, security, subscription-manager
    This system is not registered with an entitlement server. You can use subscription-manager to register.
    repolist: 0

    ReplyDelete