Maybe simple...

sudo apt-get install gcc

... could be enough?

Answer from Jot eN on askubuntu.com
🌐
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 - Done The following NEW packages will be installed: build-essential gcc gcc-9 g++ g++-9 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Once installed, you should be able to use the gcc command without any issues. If you still encounter problems, it might be a PATH issue. For macOS users, the process is slightly different.
Discussions

Trying to install gcc on a linux terminal, but I get an error - Unix & Linux Stack Exchange
E: Failed to fetch http://secu... http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_5.4.0-81.91_amd64.deb 404 Not Found [IP: 91.189.88.152 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? When I type "gcc" again, it just tells ... More on unix.stackexchange.com
🌐 unix.stackexchange.com
c - How to solve error message "gcc‬: command not found" (only with arguments) on Ubuntu - Stack Overflow
I am working with Ubuntu 19.04 (Disco Dingo), and I have GCC installed. When I run gcc I am getting an error showing that I do have gcc: gcc: fatal error: no input files compilation terminated. ... More on stackoverflow.com
🌐 stackoverflow.com
c - not able to install gcc on ubuntu 18.04.01 - Stack Overflow
I have just installed Ubuntu 18.04.1 LTS and I am trying to use the make command to compile my Makefile which is located in the same directory as my simple.c file. After running make I get the erro... More on stackoverflow.com
🌐 stackoverflow.com
zsh - GCC installed but command not found - Stack Overflow
I'm new to linux and I'm having a hard time trying to get this work. I uninstalled and installed gcc a few times. Now when I run gcc --version, it still says zsh: command not found. When I go to ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
LinuxCapable
linuxcapable.com › home › ubuntu › how to install gcc on ubuntu 26.04, 24.04 and 22.04
How to Install GCC on Ubuntu 26.04, 24.04 and 22.04 - LinuxCapable
April 30, 2026 - Install build-essential to get ... to locate package gcc-14” or a similar error, first confirm that the requested branch exists for your Ubuntu release....
Find elsewhere
🌐
DedicatedCore
dedicatedcore.com › home › how to install gcc compiler on ubuntu 22.04
How to Install GCC Compiler on Ubuntu 22.04 - DedicatedCore Blog
January 24, 2025 - On Ubuntu, installing the GCC Compiler is a simple procedure. Begin by opening the Terminal on your Ubuntu machine. Next, run a command to make sure your package lists are current. Next, run a short program to install GCC. Verify the GCC version to make sure the installation was successful.
🌐
nixCraft
cyberciti.biz › nixcraft › howto › gnu c / c++ › where is my linux gnu c or gcc compilers are installed?
Where is My Linux GNU C or GCC Compilers Are Installed? - nixCraft
January 7, 2021 - Explains how to find out gnu gcc c and c++ compiler locations in Linux operating systems and use them to compile your apps.
🌐
iO Flood
ioflood.com › blog › install-gcc-command-linux
Installing and Using the GCC Command: Linux User Guide
January 2, 2024 - In most Linux distributions, the GCC command comes pre-installed. However, if it’s not, you can install it in Debian based distributions like Ubuntu, by running the command sudo apt-get install gcc.
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to install gcc compiler on ubuntu
How to Install GCC Compiler on Ubuntu {3 Simple Methods}
February 20, 2025 - This guide will show you how to install GCC on Ubuntu and start compiling code on your system.
🌐
GitHub
gist.github.com › zuyu › 7d5682a5c75282c596449758d21db5ed
Install gcc 6 on Ubuntu · GitHub
sudo apt update 4.sudo apt-get install gcc-6 g++-6 -y ... vim is just a text editor. You can whether install it using sudo apt install vim or use another one, as nano. ... Hi, This has been useful for me, so I'll chip in. With ubuntu 20.04 you can't just add the ubuntu-toolchain repository.