Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have installed RHEL 6.3:

Linux RHEL6.3-64-BuildMac 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

My /etc/yum.conf looks as follows:

[main]  
cachedir=/var/cache/yum/$basearch/$releasever  
keepcache=0  
debuglevel=2  
logfile=/var/log/yum.log  
exactarch=1  
obsoletes=1  
gpgcheck=1  
plugins=1  
installonly_limit=3  
reposdir=/etc/yum.repos.d/rhel.repo

The contents of my /etc.yum.repo.d/rhel.repo looks like

[rhelrepo]  
name=my rhel repo  
baseurl=http://mirror.centos.org/centos/6.3/os/x86_64/  
#gpgkey=http://mirror.centos.org/centos/6.3/os/x86_64/RPM-GPG-KEY-CentOS-6  
enabled=1  
gpgcheck=0 

But now when I do "yum repolist" I get the following message:

Loaded plugins: security
repolist: 0

What do I do to resolve this?

share|improve this question
1  
/etc.yum.repo.d/rhel.repo was it typo? –  warl0ck Oct 3 '12 at 11:22

3 Answers 3

In your yum.conf file, try using:

 reposdir=/etc/yum.repos.d

instead of the full path to a repo filename. Yum expects reposdir to be a directory, containing the repo files.

share|improve this answer
    
Hi now my "yum update" commands runs but fails after sometime with the following error Error Downloading Packages: redhat-lsb-4.0-3.el6.centos.x86_64: failure: Packages/redhat-lsb-4.0-3.el6.centos.x86_64.rpm from rhelrepo: [Errno 256] No more mirrors to try. –  soma banerji Oct 3 '12 at 8:52
    
hi i am also getting the following error:[root@RHEL6 ~]# yum update Loaded plugins: security rhelrep0 mirror.centos.org/centos/6.3/os/x86_64/repodata/…: [Errno 12] Timeout on mirror.centos.org/centos/6.3/os/x86_64/repodata/…: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds') Trying other mirror. –  soma banerji Oct 3 '12 at 9:39
    
Have you tried browsing to those URLs from the client machine, to make sure you have an adequate network connection? If you have poor network, or firewall rules denying access, that could account for your timeouts. –  Lars Rohrbach Oct 3 '12 at 20:52

You are trying to update a RHEL6 system with a RHEL clone repository. The yum plugins on RHEL6 will not let you update the system that way. You can google for "convert RHEL6 to CentOS" (answers such as http://www.unixmen.com/201201-how-to-convert-rhel-6-x-to-centos-6-x/). Follow the directions and convert your RHEL system to CentOS which will then update. It's less than 10 rpms to convert RHEL to a RHEL-clone.

share|improve this answer

For those getting errors, modify /etc.yum.repo.d/rhel.repo (in addition to changing, reposdir=/etc/yum.repos.d) and change baseurl to:

baseurl=http://mirror.centos.org/centos/6/os/x86_64/ 

They are no longer supporting different versions of 6.x per the readme at: http://mirror.centos.org/centos/6.3

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.