3 C
Texas

How to Install GCC & Development Tools on Centos 8 / RHEL 8

How to install GCC & Development Tools on Centos 8 / RHEL 8.

RHEL is the best one for developing critical application also it is stable and secure Server Operating System.
For Security reasons some package are pre-installed.
For developing purposes on Centos 8 or RHEL 8 you must have installed the following development tools:

  • autoconf
  • automake
  • gcc
  • gcc-c++
  • bison
  • flex
  • binuts
  • gdb
  • glibc-devel
  • libtool
  • make
  • pkgconf
  • pkgconf-m4
  • pkgconf-pkg-config
  • redhat-rpm-config
  • rpm-build
  • rpm-sign
  • strace


Some other tools are also available in new version like centos 8 with python 3 pre installed and other tools.
You can install missing development tools by following this guide step by step:

How to list groups on Centos / RHEL 8?

Run this command to list package installed on your Centos 8.

$ dnf group list

- Advertisement -

By running this command give below, you can easily access the summary of your installed groups as well as available groups.

$ sudo dnf groups summary

Installing GCC and Development Tools on Centos / RHEL 8 Server

Type the following command to get started your installation.

$ sudo dnf group install “Development Tools”
or
$ sudo dnf groupinstall “Development Tools”


For viewing information about Development Tools type the following command:

$ sudo dnf group info “Development Tools”

Make sure installation is complete by checking tools binary location.

Also check the installed version.

$ gcc –version

$ make –version

How to Unistall GCC & Development Tools on Centos / RHEL 8.

Follow this command to remove a package group on Centos / RHEL 8.

$ sudo dnf group remove “Development Tools”

To avoid breaking other packages, be keen on dependency.
Test GCC Compiler
Let’s create a file to test weather it is working or not.
Consider this file to show hello world

$ cat hello.c
#include
int main() {
print(“hello, world!\n”);
return 0;
}

Compile this file with GCC.

$ gcc hello.c -o helloworld

Now run this file to see what’s the output?

$ ./helloworld

Congratulations You’ve all done!
If you’ve any issue regarding this tutorial, leave a comment we will get to you ASAP to help you solve your issue.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article