Maybe simple...

sudo apt-get install gcc

... could be enough?

Answer from Jot eN on askubuntu.com
🌐
ETH Zurich
stat.ethz.ch › pipermail › r-devel › 2022-November › 082150.html
[Rd] RTools40 Error - sh: line 1: gcc: command not found
** package 'jsonlite' successfully unpacked and MD5 sums checked ** using staged installation ** libs gcc -I"C:/Users/XXXXXXX/AppData/Local/Programs/R/R-42~1.2/include" -DNDEBUG -Iyajl/api -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -D__USE_MINGW_ANSI_STDIO -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o sh: line 1: gcc: command not found make: *** [C:/Users/ XXXXXXX /AppData/Local/Programs/R/R-42~1.2/etc/x64/Makeconf:253: base64.o] Error 127 ERROR: compilation failed for package 'jsonlite' * removing 'C:/Users/375492/AppData/Local/Programs/R/R-4.2.2
🌐
Stack Overflow
stackoverflow.com › questions › 72319110 › how-to-fix-bin-sh-gcc-11-3-0-1-command-not-found
r - How to fix /bin/sh: gcc-11.3.0_1: command not found - Stack Overflow
When trying to install RTidyHTML remotely from Github on RStudio (2022.02.2 Build 485) with R version 4.2.0, I'm told /bin/sh: gcc-11.3.0_1: command not found. This is after installing gcc through
Discussions

R install.packages unable to find gcc - Stack Overflow
I am unable to compile packages from source on Windows. The issue seems to be related to resolving paths in the compilation step. Following the example from the Rtools4 installation page, I get an ... More on stackoverflow.com
🌐 stackoverflow.com
February 7, 2022
windows - R CMD check not looking for gcc in Rtools directory - Stack Overflow
R has been installing packages just fine, but suddenly – I can't think of anything relevant that I modified or uninstalled – it can't find gcc when I run R CMD check in the command prompt, or devt... More on stackoverflow.com
🌐 stackoverflow.com
R 3.3.0 installing a package on Windows: gcc not found error - Stack Overflow
I am trying to install an R package which contains some C code under Windows. I have R 3.3.0 installed and also Rtools 3.3.0 installed on my computer's D: disk. And d:\Rtools\bin and d:\Rtools\mi... More on stackoverflow.com
🌐 stackoverflow.com
Unable to find gcc installing rstan on Windows 10
I have been struggling for a day to get Rstan installed and working on my Windows 10 machine and I cannot figure out what isn’t working, even though my problem seems to be similar to some I’ve found on this forum by googling. I think it has something to do with my path and where R is looking ... More on discourse.mc-stan.org
🌐 discourse.mc-stan.org
1
0
October 1, 2020
🌐
Bioconductor
support.bioconductor.org › p › 9148467
packages not installing from sources the package which needs compilation
December 19, 2022 - sh: line 1: gcc: command not found · It means your installation of RTools is somehow broken. Or maybe RStudio is dumb and doesn't pick up the PATH variable correctly? I don't know, as I don't use RStudio. I have no problem installing the source version of DelayedArray on my Windows box using ...
🌐
LinuxQuestions.org
linuxquestions.org › questions › linux-embedded-and-single-board-computer-78 › bin-sh-gcc-command-not-found-649627
/bin/sh: gcc: command not found
June 16, 2008 - hi, i am new to embedded linux,also to this forum.i am trying to compile kernel and uboot for arm target board on the centos.i installed crosstool in
🌐
Stack Overflow
stackoverflow.com › questions › 71025101 › r-install-packages-unable-to-find-gcc
R install.packages unable to find gcc - Stack Overflow
February 7, 2022 - ** package 'jsonlite' successfully unpacked and MD5 sums checked ** using staged installation ** libs *** arch - i386 C:\Rtools\mingw_64gcc -I"C:/Users/<username>/DOCUME~1/R/R-41~1.2/include" -DNDEBUG -Iyajl/api -D__USE_MINGW_ANSI_STDIO -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c base64.c -o base64.o sh: line 1: C:Rtoolsmingw_64gcc: command not found make: *** [C:/Users/<username>/DOCUME~1/R/R-41~1.2/etc/i386/Makeconf:238: base64.o] Error 127 ERROR: compilation failed for package 'jsonlite' * removing 'C:/Users/<username>/Documents/R/R-4.1.2/library/jsonlite' * restoring previous 'C:/Users/<username>/Documents/R/R-4.1.2/library/jsonlite' Warning in install.packages : installation of package ‘jsonlite’ had non-zero exit status
🌐
GitHub
github.com › krlmlr › r-appveyor › issues › 61
gcc not found with Rtools installed? · Issue #61 · krlmlr/r-appveyor
So I guess I am doing something rather silly, but I can't see what (I find it interesting that it is looking for gcc under 'd:', when tools were installed under 'c:', but maybe that is OK). My appveyor.yml is as follows (I am dealing with a package in a subdirectory): ## https://github.com/krlmlr/r-appveyor/issues/34 ## http://stackoverflow.com/questions/33411765/check-multiple-subdirectories-using-appveyor environment: TEST_DIR: OncoSimulR R_VERSION: devel USE_RTOOLS: true before_build: - cp ../travis-tool.sh travis-tool.sh - cp travis-tool.sh.cmd %TEST_DIR%\travis-tool.sh.cmd - cd %TEST_DIR% - bash -c "echo '^travis-tool\.sh\.cmd$' >> .Rbuildignore" build_script: - travis-tool.sh install_bioc_deps test_script: - travis-tool.sh run_tests
Author   krlmlr
Find elsewhere
🌐
Stan Forums
discourse.mc-stan.org › interfaces › rstan
Unable to find gcc installing rstan on Windows 10 - RStan - The Stan Forums
October 1, 2020 - I have been struggling for a day to get Rstan installed and working on my Windows 10 machine and I cannot figure out what isn’t working, even though my problem seems to be similar to some I’ve found on this forum by googling. I think it has something to do with my path and where R is looking ...
🌐
NXP
community.nxp.com › t5 › S32K › bin-sh-gcc-command-not-found › td-p › 751295
Solved: /bin/sh: gcc: command not found - NXP Community
April 21, 2020 - I test S/W of MTRDEVKSPNK144_S32DS in S32DS 2018.R1. then Error occurred while compiling . Please help. Thanks. Solved! Go to Solution. Tags (1) Tags: gcc: command not found · 1 Kudo · Reply · 1 Solution · Jump to solution · ‎04-23-2018 04:50 AM · 8,087 Views ·
🌐
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.
🌐
Reddit
reddit.com › r/manjarolinux › /bin/sh: gcc: command not found
r/ManjaroLinux on Reddit: /bin/sh: gcc: command not found
January 23, 2019 -

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.`

🌐
Reddit
reddit.com › r/nix › gcc: command not found?
r/Nix on Reddit: gcc: command not found?
September 30, 2023 -

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?

🌐
Posit Community
forum.posit.co › general
Different Error in renv::restore() - General - Posit Community
March 30, 2023 - Here're my steps I did: Install renv package install.packages( "https://cran.r-project.org/src/contrib/Archive/renv/renv_0.12.5.tar.gz", repos = NULL, type = "source" ) Initialize a local library renv::init(bare=TRUE) Install the correct packages ...
🌐
Narkive
cygwin.cygwin.narkive.com › NkaxgDH1 › gcc-command-not-found
gcc command not found
Oh, you will probably need to run these first: chmod a+x /usr/bin/set-gcc-default* chmod a+x /usr/sbin/fix-libtool-scripts-for-latest-gcc-runtimes.sh Then after it's all done you should be able to run either "set-gcc-default-3.sh" or "set-gcc-default-4.sh" to set whichever version of the compiler you want as your default. cheers, DaveK ... Permalink Argh. Bad perms, gah. Try this: for x in /etc/postinstall/{gcc.,gcc-[^tm],gcc4-}* ; do . $x done Then check in your bin dir for all the appropriate names and links. cheers, DaveK I ran your for loop command and got this: bash: /usr/sbin/fix-libtool-scripts-for-latest-gcc-runtimes.sh: Permission denied So I changed the perms of the script to chmod 744 and then re-ran the for loop.
🌐
Uga
weiming.uga.edu › AnalogsEnsemble › 2018 › 10 › 10 › installation-on-windows.html
How to Fix Compilation Failure on Windows · Parallel Analog Ensemble
October 10, 2018 - ******************************...~1/R/R-32~1.2/include" -DNDEBUG -I"C:/Users/student/Documents/R/R-3.2.2/library/Rcpp/include" -I"C:/Users/student/Documents/R/R-3.2.2/library/BH/include" -I"d:/RCompile/r-compiling/local/local320/include" -fopenmp -O2 -Wall -mtune=core2 -c AnEn.cpp -o AnEn.o sh: g++: command not found make: *** ...
🌐
Silicon Labs
community.silabs.com › s › question › 0D5Vm00000U64SnKAJ › binsh-line-1-armnoneeabigcc-command-not-found
/bin/sh: line 1: arm-none-eabi-gcc: command not found.
December 27, 2024 - The Silicon Labs Community is ideal for development support through Q&A forums, articles, discussions, projects and resources.
🌐
GitHub
github.com › rdp › ffmpeg-windows-build-helpers › issues › 95
/bin/sh: gcc: command not found · Issue #95 · rdp/ffmpeg-windows-build-helpers
October 31, 2015 - To fix this, i went back to Cygwin setup, and installed a bunch of gcc untill one of them installed gcc.exe into /bin/ of the local install of cygwin. 2015-10-30 22:03:00 (36.3 MB/s) - 'quick_cross_compile_ffmpeg_fdk_aac_using_packaged_mingw64.sh' ...
Author   rdp