"command not found" when trying to call CMake or GCC after installing them
windows - "bash: gcc: command not found" -- Error while installing GCC, GDB and G++ with MSYS2 - Stack Overflow
GCC not found
Aarch64-none-linux-gnu-gcc: not found
Videos
RHEL / CentOS
yum install gcc should work. Try sudo yum install gcc.
If yum groupinstall "Development Tools" does not work, add sudo in front of it as well.
Check your repositories: yum repolist all
That's because it isn't finding a package named solely gcc. That is too broad. Do a yum search gcc to see all of the gcc packages, and the full package name. Then you'll be able to install the correct one. It'll probably be something like yum install gcc 4.x And as others said, don't forget to be in root or do `sudo. I've had this same thing happen to me a few times.
Maybe 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!
While installing vmware this error popup gcc not found. How to tackle it
After running the second pass of gcc, ldd was pointing that gcc was using the host libraries. I didn't know how to solve it, so I simply ran the second pass of gcc again, but using the gcc binary of the last second pass without passing a CC variable.
Then ldd started to show that gcc was using the stuff under /tools.
But the binaries of binutils was also using the host libs, so I made again the second pass of binutils, without the CC, CXX, RANLIB or AR. This time it worked, I guess.
Now I am compiling glibc inside the chroot environment and so far I had no more problems. I don't know if what I did was right, but it did work.
I had this issue the first and second time I went through LFS. I was using multiple console windows to build multiple packages at the same time because there are a lot of small packages to build.
I started over a third time and decided just to build one package at a time. It took a long time but I got everything to compile correctly and work properly in the chroot environment.
If you run into this problem, you should probably just start over:
rm -rf /mnt/lfs/tools/*
Then just rebuild all of the packages, one at a time, following all instructions exactly. It is also not recommended to build this inside VirtualBox but I was able to get it to work after a couple of tries.