Maybe simple...
sudo apt-get install gcc
... could be enough?
Answer from Jot eN on askubuntu.comR install.packages unable to find gcc - Stack Overflow
windows - R CMD check not looking for gcc in Rtools directory - Stack Overflow
R 3.3.0 installing a package on Windows: gcc not found error - Stack Overflow
Unable to find gcc installing rstan on Windows 10
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!
OK, I sent an email to the R-package-devel group regarding to this issue. And the following is the reply, and it does work!
Please adapt your BINPREF variable in R/etc/$Arch/Makeconf files appropriately to point to the coresponding compiler for each architecture - this is new with the new toolchain we use with R >= 3.3.0.
If you don't want to edit the Makefile directly (as of R 3.6.3 at least), you can set BINPREF as an environment variable pointing to the appropiate mingw_{32,64}/bin/ path
Couple of gotcha's on Windows to note:
- Need to use forward slahes in the path (and so can't use any
environment variables like
%LocalAppData%in there) - Trailing forward
slash after
bin
I'm also getting the same for cc and pkg-config. I was trying to compile a kernel and install something from AUR. Searching around didn't give me any answers that I felt comfortable following as I couldn't establish that the contexts in which the issues occurred were similar enough. Any help appreciated.`
I've got source that builds fine on my computer (M1 mac) with make all; it's all C under there, afaik. I'm trying to wrap it in a flake and get nix to build it. nix build on my flake, however, fails with line 1: gcc: command not found.
I was under the impression, though, that gcc was always available for builds. When I go into nix develop and which gcc, I get /usr/bin/gcc, not some massive nix hash. Is this perhaps the problem, or an indication of the problem?
My flake is here; it's pretty much the same as the nixpkgs default.nix here, except that the source url and platforms are changed. Perhaps this is a linux/mac thing?