Maybe simple...

sudo apt-get install gcc

... could be enough?

Answer from Jot eN on askubuntu.com
🌐
nixCraft
cyberciti.biz › nixcraft › howto › centos › centos / rhel 7: install gcc (c and c++ compiler) and development tools
CentOS / RHEL 7: Install GCC (C and C++ Compiler) and Development Tools - nixCraft
April 5, 2024 - To install all the packages belonging to a package group called “Development Tools” use the following command: # yum --setopt=group_package_types=mandatory,default,optional groupinstall "Development Tools" OR # yum --setopt=group_package_types=mandatory,default,optional group install "Development Tools" The yum has changed in Red Hat Enterprise Linux 7/CentOS 7. The package group “Development Tools”” has only the optional packages which by default doesn’t get installed. So we will need to pass the option --setopt=group_package_types=mandatory,default,optional to install the optional packages too. Type the following which command or type command/command command to see the gcc binary location.
Discussions

centos - ./configure cannot find GCC but whereis is able to? - Unix & Linux Stack Exchange
I have the minimal install from CentOS-7-x86_64-Everything-1708.iso running in VirtualBox. Due to an Apache HTTPD dependency issue, I am trying to configure pcre via: ./configure --prefix /usr/lo... More on unix.stackexchange.com
🌐 unix.stackexchange.com
February 19, 2018
python - error: command 'gcc' failed with exit status 1 on CentOS - Stack Overflow
I'm trying to install lxml package on CentOS using sudo pip install lxml and its throwing this error right at the end: error: error: command 'gcc' failed with exit status 1 ---------------------... More on stackoverflow.com
🌐 stackoverflow.com
linux + g++: command not found - Unix & Linux Stack Exchange
I want to install on my Linux red-hat machine gettext-0.19.1.tar.xz. First I do the following cd gettext-0.19.1 ./configure make During make it fails on g++: command not found libtool: compile:... More on unix.stackexchange.com
🌐 unix.stackexchange.com
July 2, 2014
gcc - how to install gcc7 in docker centos7 - Stack Overflow
After some more research, it seems ... SHELL command from your dockerfile to alternate between shells. Here my docker file : FROM centos:centos7 RUN yum -y update RUN yum -y install centos-release-scl RUN yum -y install devtoolset-7-gcc* SHELL [ "/usr/bin/scl", "enable", "devtoolset-7"] RUN gcc --version ... gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Stack Overflow
stackoverflow.com › questions › 72183352 › bin-sh-aarch64-linux-gnu-gcc-ar-command-not-found-on-centos-7
centos7 - /bin/sh: aarch64-linux-gnu-gcc-ar: command not found on centos-7 - Stack Overflow
Sorry, the file 'aarch64-linux-gnu-gcc-ar' appeared first time with gcc v5.3.1 : Fedora 22 packages archives.fedoraproject.org/pub/archive/fedora/linux/updates/22 ..... + archives.fedoraproject.org/pub/archive/fedora/linux/releases/22/… ......... CentOS 7: I made an OK test install drive.google.com/drive/folders/…
🌐
LinuxQuestions.org
linuxquestions.org › questions › linux-server-73 › bash-gcc-command-not-found-4175486793
bash gcc command not found - Linux - Server
December 4, 2013 - [root@gtzjdb bin]# which gcc /usr/bin/which: no gcc in (/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin
🌐
Ryadel
ryadel.com › home › centos / linux – make: g++: command not found – how to fix
CentOS / Linux - make: g++: Command not found - How to fix
August 12, 2018 - Luckily enough, the fix is really simple: all you have to do is to install GCC, the GNU Compiler Collection package, which enables full C++ compilation support for most modern Linux distributions (here's the last changelog).
🌐
Centos
forums.centos.org › viewtopic.php
Not able to compile using GCC - CentOS Forums
August 26, 2008 - My eclipse IDE is showing Linux GCC chain and that includes both c and c++ compilers. Not sure why I am able to compile c and not c++. I previously had some 3.3 version of GCC installed and then I updated it to 4.1.2 and still no difference. When I type G++ on my command line it says command not found.
🌐
Psychz
psychz.net › client › kb › en › how-to-install-the-gcc-compiler-in-centos-7.html
How to install the GCC compiler in CentOS 7? ...
The Free Software Foundation distributes GCC under the GNU General Public License. In the following tutorial, we will perform GCC installation on CentOS 7. The installation process is quite simple and should not take more than 10 minutes. Note: You need to log in to your CentOS 7 VPS via SSH as user root ... GCC can be easily installed from the official CentOS repositories. Run the following command to install GCC on your server
Call   800-933-1517
Address   611 Wilshire Blvd #300, 90017, Los Angeles,
Find elsewhere
🌐
GitHub
gist.github.com › nchaigne › ad06bc867f911a3c0d32939f1e930a11
Building GCC 9.2.0 on CentOS 7 · GitHub
yum install centos-release-scl -y yum clean all yum install devtoolset-9-* -y scl enable devtoolset-9 bash ... This helped, Thank you! ... This helped a lot. ... Great guide. To enable gcc 9 as default, may have to run the following commands:
🌐
Delft Stack
delftstack.com › home › howto › linux › solve gcc command not found error in bash
How to Solve GCC Command Not Found Error in Bash | Delft Stack
March 11, 2025 - Encountering the “gcc command not found” error in Bash can be a common hurdle for developers, but it is usually easy to fix. By checking if GCC is installed, installing it if necessary, and ensuring that your PATH variable is correctly set, you ...
🌐
LinuxHostSupport
linuxhostsupport.com › home › how to install gcc on centos 7
How To Install GCC on CentOS 7 | LinuxHostSupport
May 24, 2019 - As might be seen from the output, the GCC version distributed by CentOS 7 is 4.8.5 which is not the latest version of GCC. You may also want to install gcc-c++. It will automatically include the C++ library and compile files with extensions that indicate they are C source as C++, instead of as C. ... If you need a newer version of GCC than the one distributed by the official CentOS 7 repositories you can install it from source. It is highly recommended to start a screen session before starting the installation. Run the following command
🌐
Linuxize
linuxize.com › home › gcc › how to install gcc compiler on centos 7
How to Install GCC Compiler on CentOS 7 | Linuxize
October 31, 2019 - To do so type the following command on your CentOS 7 terminal: ... To access GCC version 7, you need to launch a new shell instance using the Software Collection scl tool: ... Now if you check the GCC version, you’ll notice that GCC 7 is the ...
🌐
Stack Overflow
stackoverflow.com › questions › 49028925 › gcc-compiler-not-found
rhel - gcc compiler not found - Stack Overflow
echo $PATH /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/ptladmin/bin:/usr/libexec/gcc whereis gcc gcc: /usr/libexec/gcc gcc --version -bash: gcc: command not found
🌐
CyberITHub
cyberithub.com › install-gcc-and-c-compiler
Easy Steps to Install GCC(C and C++ Compiler) on CentOS 7 | CyberITHub
January 18, 2020 - a)You need to have a running CentOS 7 System. b)Also you need to have wget installed in your system with internet connection. c)Lastly you need to login with root access or user with sudo access to run gcc installation commands.