Question

So, I'm trying to change my Repositorys in RHEL but I allways get the following message and have NO IDEA what it means.

Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Could not retrieve mirrorlist http://mirrors.elrepo.org/mirrors-elrepo.el6 error was
12: Timeout on http://mirrors.elrepo.org/mirrors-elrepo.el6: (28, 'connect() timed out!')
http://elrepo.org/linux/elrepo/el6/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://elrepo.org/linux/elrepo/el6/x86_64/repodata/repomd.xml: (28, 'connect() timed out!')
Trying other mirror.
http://mirrors.coreix.net/elrepo/elrepo/el6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2a01:c0:2:3d::2: Network is unreachable"

[...]

Trying other mirror.
http://mirror.ventraip.net.au/elrepo/elrepo/el6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2400:b800:1:1::15: Network is unreachable"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: elrepo. Please verify its path and try again
Was it helpful?

Solution

You can create your own repository if you have os image.

Mount os image at some folder say /var/rhel-repo using

mount -o loop /path/to/os_image /var/rhel-repo

create repo file in /etc/yum.repos.d/customrepo as

[customrepo]
name=Custom Repository
baseurl=file:///var/customrepo
enabled=1
gpgcheck=0

save file.Then

yum clean all

OTHER TIPS

Configuration of repositories are in /etc/yum.repos.d/ folder on RHEL like systems.

Looking on your error message:

  1. you don't have active Subscription with RHEL, so you cant access any RHEL repositories. Use subscription-manager to register
  2. every repository you are trying to connect to, is unreachable or you are getting timeout. Check your internet configuration / connection.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top