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 - For example, if GCC is located in /usr/local/bin/gcc, you would add the following line to your .bashrc or .bash_profile: ... Now, try running the gcc --version command again. If everything is set up correctly, you should see the version number without any errors. Encountering the “gcc command not found” error in Bash can be a common hurdle for developers, but it is usually easy to fix.
Discussions

"-bash: gcc: command not found" using cygwin when compiling c? - Stack Overflow
I just installed the latest version of Cygwin ans for some reason when I try to compile code, it always flashes me this error: -bash: gcc: command not I also don't seem to have the gcc.exe that p... More on stackoverflow.com
🌐 stackoverflow.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
GCC not found
Try sudo apt install build-essential it has dependencies for GCC, G++, make, libc-dev etc it's kind of odd that you don't already have it installed More on reddit.com
🌐 r/Ubuntu
4
0
February 19, 2024
linux - LFS 7.4 chapter 6.7: make: gcc: Command not found - Unix & Linux Stack Exchange
I am (again) trying LFS. The version is 7.4 I am stuck at chapter 6.7, where I must run: make mrproper and I get this error: make: gcc: Command not found. But the gcc is there. I also cannot run More on unix.stackexchange.com
🌐 unix.stackexchange.com
January 20, 2014
🌐
iO Flood
ioflood.com › blog › install-gcc-command-linux
Installing and Using the GCC Command: Linux User Guide
January 2, 2024 - # For Debian based distributions like Ubuntu sudo apt-get install gcc # For RPM-based distributions like CentOS sudo yum install gcc # Output: # 'gcc is already the newest version (4:7.4.0-1ubuntu2.3).' # OR # 'Package gcc is not available, ...
🌐
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
Find elsewhere
🌐
Bash Commands
bashcommands.com › bash-gcc-command-not-found
bash Gcc Command Not Found: Quick Fixes and Tips
May 13, 2025 - The error "bash: gcc: command not found" indicates that the GCC (GNU Compiler Collection) is not installed on your system or is not in your system's PATH, which can be resolved by installing it or ensuring it's correctly configured.
🌐
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 - BUT that is for c++ compiling so for C use sudo yum install gcc · It seems that you need to put sudo in front of the command to use root 0.o maybe. ... Sudo will raise the priv level of the currently logged in user to execute the task listed after it (you can also find out more with: man sudo), it is like right clicking in Windows and selecting to run as administrator. ... I have several error to comiple SPEC2006. can you help specmake: icc: Command not found Error with make ‘specmake build’ specmake: *** [spec.o] Error 127 Command returned exit code 2 Error with make!
🌐
Google Groups
groups.google.com › g › beagleboard › c › JrOQBmaYXyQ
gcc: command not found. Error while compiling c - program
ubuntu@arm:~$ sudo find / -name '*gcc*' [sudo] password for ubuntu: /var/lib/dpkg/info/libgcc1:armhf.symbols /var/lib/dpkg/info/gcc-4.8-base:armhf.md5sums /var/lib/dpkg/info/libgcc1:armhf.md5sums /var/lib/dpkg/info/gcc-4.8-base:armhf.list /var/lib/dpkg/info/libgcc1:armhf.shlibs /var/lib/dpkg/info/libgcc1:armhf.postinst /var/lib/dpkg/info/libgcc1:armhf.postrm /var/lib/dpkg/info/libgcc1:armhf.list /lib/arm-linux-gnueabihf/libgcc_s.so.1 /home/dell/sources/vim74/runtime/compiler/gcc.vim /usr/share/lintian/overrides/libgcc1 /usr/share/doc/gcc-4.8-base /usr/share/doc/libgcc1 /usr/lib/gcc and the folder /usr/lib/gcc/arm-linux-gnueabihf contain two folders(4.8 and 4.8.1(, but both are empty.
🌐
Stack Overflow
stackoverflow.com › questions › 45647313 › gcc-command-not-found-but-already-installed
c++ - gcc: command not found but already installed - Stack Overflow
August 12, 2017 - You can install it by typing: sudo apt-get install gcc ... What did you do at the prompt: Do you want to continue? [Y/n] Abort. Did you press Enter or n? The Abort. part suggests you did not continue the install.
🌐
Ask Ubuntu
askubuntu.com › questions › 515181 › when-building-u-boot-bin-bash-arm-none-linux-gnueabi-gcc-command-not-found
when building u-boot /bin/bash: arm-none-linux-gnueabi-gcc: command not found - Ask Ubuntu
I am also not sure why I need to have sudo as part of the command? If I do not I get a permissions error. Any help or information on what I am doing wrong would be greatly appreciated. ... Do the arm executables have their execute permission set? If mounted, is your home not mounted with "noexe"? Try putting the PATH modifications into your .profile and ensure the export PATH is used. Similarly for LD_LIBRARY_PATH. ... If it is not showing elf 64 bit then it won't work.
🌐
Reddit
reddit.com › r/linuxquestions › linux from scratch: chapter 5.3 x86_64-lfs-linux-gnu-gcc: command not found
r/linuxquestions on Reddit: Linux From Scratch: chapter 5.3 x86_64-lfs-linux-gnu-gcc: command not found
March 7, 2021 -

Hello, when i enter

cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
  `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/install-tools/include/limits.h

at gcc-10.2.0 i get the error message:

bash: x86_64-lfs-linux-gnu-gcc: command not found
dirname: missing operand
Try 'dirname --help' for more information
bash: /install-tools/include/limits.h: No such file or directory

I tried re-making everything in chapter 5.3 and got the error (at the make process): [Makefile:12848: configure-target-libcc] Error 1 and [Makefile:945: all] Error 2.

Any ideas?