Tuesday, October 15, 2019

How to Install GCC on CentOS / RHEL 7

Below are the Cent OS package list contents

autoconf
automake
binutils
bison
flex
gcc (c compiler)
gcc-c++ (c++ compiler)
gettext
libtool
make
patch
pkgconfig
redhat-rpm-config
rpm-build
rpm-sign

Now, we need to install the packages in groups. First to check if the Development Tools package is present, that can be done by the following command

yum group list
This shows the development Tools as available group. Ton install the Development tools, need to login as root and execute the following command

yum group install "Development Tools"

Thats it, it installs a bunch of tools and ready to go.

Now enter cc in terminal, it should show some message like below

cc: fatal error: no input files
compilation terminated.

Great, done!

References:
https://www.cyberciti.biz/faq/centos-rhel-7-redhat-linux-install-gcc-compiler-development-tools/

No comments:

Post a Comment