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!
"-bash: gcc: command not found" using cygwin when compiling c? - Stack Overflow
c - How to solve error message "gcc: command not found" (only with arguments) on Ubuntu - Stack Overflow
GCC not found
linux - LFS 7.4 chapter 6.7: make: gcc: Command not found - Unix & Linux Stack Exchange
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.
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?
