Installing gcc on rhel 6.1

16,647

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:
16,647

Related videos on Youtube

Chander Shivdasani
Author by

Chander Shivdasani

A Programmer in race with the universe. While the universe is busy creating fools, im busy writing complex programs.

Updated on September 18, 2022

Comments

  • Chander Shivdasani
    Chander Shivdasani over 1 year

    GCC doesn't 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
    
    
    
    
    
    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
    
    • Rilindo
      Rilindo over 12 years
      Can you paste what you have under /etc/yum.repos.d?
    • Chander Shivdasani
      Chander Shivdasani over 12 years
      I edited the question with the output of what you asked
    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' over 12 years
      @ChanderShivdasani And what's in those .repo files?
  • Chander Shivdasani
    Chander Shivdasani over 12 years
    How do i check whether i'm subscribed to any of these?
  • Rilindo
    Rilindo over 12 years
    Let me ask this: have your brought a RH subscription?
  • Chander Shivdasani
    Chander Shivdasani over 12 years
    yup. I work in a company and i'm trying to do this in one of their servers
  • wormintrude
    wormintrude about 12 years
    @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.