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.
🌐
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).
🌐
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
🌐
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? ...
March 17, 2019 - 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,
🌐
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:
Find elsewhere
🌐
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 ...
🌐
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.
🌐
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