Maybe simple...
sudo apt-get install gcc
... could be enough?
Answer from Jot eN on askubuntu.comMaybe simple...
sudo apt-get install gcc
... could be enough?
Do this: open a terminal and type gcc --version. Does anything come up?
Alternatively, search for the gcc executable, which should be located in /usr/bin.
Do ls /usr/bin | grep gcc. What output do you get from that command?
If you get no output from either command, then you need to find your gcc executable wherever you installed it (somewhere in /usr/share maybe?). When found, do cd /usr/bin && ln -s [ABSOLUTE PATH OF GCC].
If you got no output from the first, but output from the second, then you have serious trouble, because /usr/bin is not in your PATH. Edit the file /etc/environment and ADD the following line to the end of the document: PATH="$PATH:/usr/bin".
If you got output from the first, then there is a problem somewhere with bash not reading its own PATH. I think hell would freeze before the first works, but watch you prove me wrong and freeze hell for me. :)
Hope this helps! +1 me if it does!
Trying to install gcc on a linux terminal, but I get an error - Unix & Linux Stack Exchange
c - How to solve error message "gcc: command not found" (only with arguments) on Ubuntu - Stack Overflow
c - not able to install gcc on ubuntu 18.04.01 - Stack Overflow
zsh - GCC installed but command not found - Stack Overflow
Videos
While installing vmware this error popup gcc not found. How to tackle it
If sudo apt-get update does not work for you, you should maybe try sudo apt-get clean to clean the cache and then execute sudo apt-get update
This may or may not be your problem, but I had the same issue when first installing my copy of Ubuntu 18.04.01. I did not yet have the drivers of my wifi-dongle installed, and, as such, I couldn't reach any site (including the sites of Ubuntu working with package updates).
So, it may be an internet-related issue. I read in the comments that
you could execute apt-get update. Maybe there is a different
connection issue at work? I would check those settings.
gcc is in /Developer/usr/bin and /usr/bin. Check these directories and the value of your PATH environment variable, and add to it as needed.
With the latest Xcode, you first need to "Install Command Line Tools." Open XCode. Under the XCode tab, open Preferences, click on the Download panel, and click the install button next to CLI Tools to manually download the XCode CLI Tools.
Once you do that, gcc will be in /usr/bin.
gcc isn't installed anymore by Xcode, it really installs clang and calls it gcc
usxxplayegm1:~ grady$ which gcc
/usr/bin/gcc
usxxplayegm1:~ grady$ /usr/bin/gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.0.2
Thread model: posix
you need man clang
I thought it was a symlink, but ls -l doesn't list it as a symlink, so either it is a hard link or some other sort of trickery.
This may be old and doesn't quite answers your concrete question, but I found myself in the same problem with Kali Linux and I solved it with this command, maybe is useful for someone:
apt install gcc-doc