I have a Red Hat Enterprise Linux version 5 installed on one of the production server. However, I noticed that there is no GNU c/c++ compiler installed on the RHEL 5/RHEL 6 based system. I need to compile a few applications on this box. How do I install C or C++ compiler on Red Hat Enterprise Linux 5/6? Where can I get / download compiler package?
In order to compile and use c/c++ under RHEL you need the 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:
- Use GUI tool to install compiler set
- Install compiler rpms from CDROM/DVD
- Download and install compiler from RHN over the Internet
Option # 1: Use GUI tool to install c/c++ compiler set
You can use a 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 RHEL/CentOS Linux CD/DVD and install the following packages using rpm command:
# rpm -ivh gcc*
Option # 3: Download and install compiler from RHN over the Internet
You can download and install packages using RHN and yum command:
# yum install gcc gcc-c++ autoconf automake
- Ubuntu Linux Install GNU GCC Compiler and Development Environment
- Debian Linux Install GNU GCC Compiler and Development Environment
- CentOS / RHEL 7: Install GCC (C and C++ Compiler) and Development Tools
- Download and Install C, C++ Compiler on Red Hat Enterprise Linux 5 (RHEL)
- Mac OS X: Install GCC Compiler with Xcode
- Where is My Linux GNU C or GCC Compilers Are Installed?
- HowTo: Compile And Run a C/C++ Code In Linux
- RHEL / CentOS Linux Install Core Development Tools Automake, Gcc (C/C++), Perl, Python & Debuggers
- HowTo Compiling C Program And Creating Executable File Under a Linux / UNIX / *BSD
- How To Install ncurses Library on a Linux
- Linux Find Out What Compilers Are Installed or Available On The System
- Linux Find Out GNU gcc Compiler Version Used To Compile Running Kernel
- Howto see output of C program in Linux or UNIX