ScaleScaleScaleScale

Tips / Nginx


How to Install GCC and Development Tools on CentOS 7

If you have a fresh CentOS 7 server just installed, one thing that you may need in order to have all required packages is the GCC compiler, and the Development Tools. These are basic packages that any Linux user may need, even if you are not a developer. The list of development tools include this main packages:

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

Install GCC and Development Tools on a CentOS –  RHEL 7 server

yum group install "Development Tools"

Verify gcc was installed properly on your CentOS box:

[tech@server ~]$ whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz

Now run gcc –version to see what version was installed:

[tech@server ~]$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.

Testing gcc compiler is working:

nano -w mytest.c

And paste this inside:

#include
int main(void){
printf("Hello There!n");
return 0;
}

Now compile mytest.c in order to create mytest file:
cc mytest.c -o mytest

Execute the application, you should see a ‘Hello There’ message:

./mytest

Hello World!

Popular search terms:

  • centos 7 development tools
  • centos 7 gcc
  • install gcc centos 7
  • yum install gcc
profile

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking

  • Oleg

    Hello,
    If you are try do it from minimal install CentOS 7 -> than yum group install “Development Tools” -> is NOT worked..
    No packages in any requested group available..

    • Type the following as root:

      yum group install “Development Tools”

      OR

      sudo yum group install “Development Tools”

      If those tw failed try:
      yum groupinstall “Development Tools”

      It should work.

  • Mike

    #include

    Thanks for the posting.

  • pandiyan

    thanks and i cannot install ffmpeg-php in my centos 7 server.
    please help me. when i tried to install this tool this is also not running well i think so.

    [usr1@aryan new]$ sudo yum group install “Development Tools”
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    * base: centos.excellmedia.net
    * epel: epel.mirror.net.in
    * extras: centos.excellmedia.net
    * nux-dextop: mirror.li.nux.ro
    * remi-safe: mirrors.thzhost.com
    * rpmforge: mir01.syntis.net
    * updates: centos.excellmedia.net
    Maybe run: yum groups mark install (see man yum)
    No packages in any requested group available to install or update
    [usr1@aryan new]$

    When i run make command in ffmpeg-php i got ffmpeg_php.lo error.

    • Hey @pandiyan

      Please paste the exact error with ffmpeg_php.lo you mentioned.

  • Hugo Lara Sanchez

    Hi everyone, i have the same error that pandiyan.

    [root@nodouno ~]# yum groupinstall ‘Development tools’
    Loaded plugins:fastestmirror
    Loading mirror speeds from cached hostfile
    * base: centos.unixheads.org
    * extras: mirrors.easynews.com
    * updates: mirror.steadfast.net
    Advertencia: Grupo development no tiene ningún paquete que instalar.
    Maybe run: yum groups mark install (see man yum)
    No packages in any requested group available to install or update

    and i have connection to internet 🙁