Question
How can I install the necessary C compiler and linker to resolve the "cc not found" error on Red Hat or CentOS?
Asked by: USER2527
111 Viewed
111 Answers
Answer (111)
To resolve this, you typically need to install the 'Development Tools' package group. On modern Red Hat/CentOS (RHEL 8+ or CentOS 8+), use `sudo dnf groupinstall "Development Tools"`. For older versions (RHEL 7 or CentOS 7), use `sudo yum groupinstall "Development Tools"`. This command installs `gcc`, `g++`, `make`, `ld` (the linker), and other essential utilities required for compiling and linking C/C++ programs.