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.

GCC doesnt seem to be installed on my Rhel 6.1 machine. Also, when i did:

sudo yum install gcc 

It barfed:

Updating Red Hat repositories.
Setting up Install Process
No package gcc available.
Error: Nothing to do

The same command works fine on rhel 5.5. What could be the problem?

sudo yum search gcc

Returns:

libgcc.x86_64 : GCC version 4.4 shared support library
libgomp.x86_64 : GCC OpenMP v3.0 shared support library

sudo yum grouplist

Returns:

Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
Setting up Group Process
Error: No group data available for configured repositories


sudo yum repolist

Returns:

Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
repolist: 0

Update:

ls -l /etc/yum.repos.d/

Returns:

-rw-r--r--. 1 root root  67 Nov 28 06:28 redhat.repo
-rw-r--r--. 1 root root 529 Apr 27  2011 rhel-source.repo
share|improve this question
    
Can you paste what you have under /etc/yum.repos.d? –  Rilindo Nov 28 '11 at 20:23
    
I edited the question with the output of what you asked –  Chander Shivdasani Nov 28 '11 at 21:27
    
@ChanderShivdasani And what's in those .repo files? –  Gilles Nov 28 '11 at 23:37

1 Answer 1

up vote 1 down vote accepted

yum install gcc should work, as you suspect. Maybe you need to subscribe to a specific channel in RHN but this gcc advisory seems to indicate that gcc should be available on all of these channels, and I assume you're already subscribe to at least one of them:

  • Red Hat Enterprise Linux Desktop (v. 6)
  • Red Hat Enterprise Linux HPC Node (v. 6)
  • Red Hat Enterprise Linux Server (v. 6)
  • Red Hat Enterprise Linux Workstation (v. 6)
share|improve this answer
    
How do i check whether i'm subscribed to any of these? –  Chander Shivdasani Nov 28 '11 at 21:32
    
Let me ask this: have your brought a RH subscription? –  Rilindo Nov 28 '11 at 21:43
    
yup. I work in a company and i'm trying to do this in one of their servers –  Chander Shivdasani Nov 28 '11 at 21:53
    
@Chader Shivdasani: Can you see the system in your RHN ? For a registered system, "yum repolist all" ran as root should yield, amongst other lines: rhel-x86_64-server-6 Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64) 6,909 You can also run, as root, "rhn-register", if the system is already registered, then a "This systems appears to be registered with RHN" will show up. If the system isn't registered, you can then do it via rhn_register or rhnreg_ks. –  wormintrude Feb 28 '12 at 19:04

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.