[SOLVED] Enabling CentOS repos in RHEL

Posted by Rick_Smith on 2012/4/11 16:47:05
How do I enable CentOS repos in RHEL 5.8, I tried this but am getting an error message:

[root@db3 yum.repos.d]# vi centos.repo

[CentOS5.8 base]
name=CentOS-5.8-Base
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
[CentOS5 updates]
name=CentOS-5.8-Updates
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=updates
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
[CentOS5plus]
name=CentOS-5.8-Plus
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


[root@db3 yum.repos.d]# yum --enablerepo centos.repo
Loaded plugins: katello, product-id, security, subscription-manager
Updating certificate-based repositories.
Bad id for repo: CentOS5.8 base, byte = 9
Bad id for repo: CentOS5 updates, byte = 7


Error getting repository data for centos.repo, repository not found
[root@db3 yum.repos.d]#

Re: Enabling CentOS repos in RHEL

Posted by TrevorH on 2012/4/11 16:58:24
Remove the blanks from the names.

Re: Enabling CentOS repos in RHEL

Posted by Rick_Smith on 2012/4/11 17:08:10
Thank you, that did it....how'd you know?

Re: [SOLVED] Enabling CentOS repos in RHEL

Posted by pschaff on 2012/4/12 2:00:39
Experience?

Thanks for reporting back. Marking this thread [SOLVED] for posterity.

This Post was from: https://www.centos.org/newbb/viewtopic.php?forum=37&topic_id=36860