About Linux FAQ

Browse More FAQs:

Download or install C, C++ compiler on Red Hat Enterprise Linux 5 (RHEL)

Posted by Vivek Gite [Last updated: December 21, 2007]

Q. I have Red hat enterprise Linux 5 installed on one of the production server. However there is no c compiler installed. I need to compile few applications on this box. How do I install C or C++ compiler on Red Hat Enterprise Linux 5? Where can I get / download compile package?

A.In order to compile and use c/c++ under Linux you need following packages
=> autoconf : GNU's Autoconf is a tool for configuring source code and Makefiles.
=> make/automake : A GNU tool for controlling the generation of executables and other
non-source files of a program from the program's source files.
=> GNU GCC C compiler (gcc) : The gcc package contains the GNU Compiler Collection version 4.1
=> GNU GCC C++ compiler (gcc-c++): This package adds C++ support to the GNU Compiler Collection.

You have total 3 options to download and install GCC compiler under Redhat / CentOS / Fedora Linux:
[a] Use GUI tool
[b] Install rpm from CDROM/DVD
[c] Download and install compiler from RHN over internet

Option # 1: Use GUI tool

Use GUI tool called system-config-packages to install gcc. Just type the following command and select gcc and above packages:
$ system-config-packages &

Option # 2: Install rpm from CDROM/DVD

Mount your CD/DVD and install following packages using rpm command.
# rpm -ivh gcc*

Option # 3: Download and install compiler from RHN over internet

You can download and install packages using RHN and yum command:
# yum install gcc gcc-c++ autoconf automake

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Discussion on This FAQ

  1. ali110 Says:

    i wont compiler c linux redhat as4

  2. Rajic Says:

    Its Great to use needed this kind of blogs

  3. anas Says:

    Very use full thanks lot

  4. Rod Evans Says:

    This really is one of the clearest and most helpful answers to a tech question that I’ve ever seen. I’ve just taken on a RHEL v5 server and needed gcc installed - ten minutes after finding this site, I have gcc 4.1.2 installed. This must have saved me a few hours of searching and reading install instructions . . .

    I found your site through Google but have now bookmarked it and I’ll be back!

  5. ttty Says:

    thanks for the info!

  6. xfgs Says:

    why registration is Required???? if it is free
    u will get hit more if u remove this step

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , , , , , , , , , , ,

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.