2

I'm trying to install DevTools using RStudio with my R version 4.0.5. I install the packages in RStudio from the CRAN repository, and everything looks fine until the following comes up:

enter image description here

obviously processx is a dependency of DevTools. The trouble seems to start when the system tries to use the 'as' executable in RTools. It can't seem to use it but it's definitely there and in the same folder as my gcc executable:

My 'as' executable in RTools. Path it's on can be seen at top.

I've already added the following values to the following environment variables:

Variable Value
Path C:\Program Files\R\R-4.0.5\bin;C:\rtools42\usr\bin;
BINPREF C:\rtools42\x86_64-w64-mingw32.static.posix\bin\
R_HOME C:\Program Files\R\R-4.0.5\library\base\R\Rprofile
R_LIBS_USER C:\Program Files\RPackages
R_USER C:\Program Files\R\R-4.0.5
RTOOLS42_HOME C:\rtools42

I'm wondering what to try next?

EDIT: See below for results of GCC -v as suggested:

enter image description here

Edit 2: The original issue was fixed by updating my R version, but now as I try to install a package called "markdown" I'm encountering this next issue:

enter image description here

Edit 3: here is the output from my sessioninfo():

 sessionInfo(package = NULL)
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                           LC_TIME=English_United States.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] sessioninfo_1.2.2

loaded via a namespace (and not attached):
[1] compiler_4.2.1 cli_3.4.1      tools_4.2.1 

Here's the output from Help > About RStudio:

RStudio
2022.07.2 Build 576
© 2009-2022 RStudio, PBC
"Spotted Wakerobin" Release (e7373ef8, 2022-09-06) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36
  • 1
    Can you go to windows command prompt and type `gcc -v`, post output. – jay.sf Oct 19 '22 at 04:50
  • @jay.sf Sure, see edit above. – William Kozlowski Oct 19 '22 at 06:21
  • 1
    `gcc` version might be outdated, I'm using `11.2.0`, running Linux though. Also your R is not up to date. Try updating both first if possible. – jay.sf Oct 19 '22 at 06:33
  • Thanks! Updating R fixed the original issue but now I'm trying to install a package called "markdown" and encountering the issue in the Edit 2 above. Do you still think updating gcc would help? I'm not sure how to go about it. (My current gcc has a last modified date of 9/28/2022.) – William Kozlowski Oct 20 '22 at 03:21
  • 1
    Maybe you need to add `rtools` to your [PATH](https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them). See this answer: https://stackoverflow.com/a/63021335/6574038 – jay.sf Oct 20 '22 at 04:40
  • BTW, in future please paste any code or output as text in your questions, i.e. don't post images, since code from images can't be copied, thanks. – jay.sf Oct 20 '22 at 04:41
  • OK, got it. My system BINPREF and PATH variables along with my user PATH originally had 'C:\rtools42\x86_64-w64-mingw32.static.posix\bin\' so I tried replacing that with 'C:\rtools42\usr\bin\' and it still didn't work. From the 'command not found' output it seems that something in my RTools is missing but I'm not sure what. – William Kozlowski Oct 20 '22 at 12:42
  • 1
    Just to be sure, meanwhile you're running R4.2.1? You might want to add `sessionInfo()` to your question as well as RStudio version _Help >> About_ – jay.sf Oct 20 '22 at 12:44
  • See Edit 3 above for both ^ – William Kozlowski Oct 20 '22 at 13:43
  • 1
    My last suggestion: you could try a [daily](https://dailies.rstudio.com/). I am at a loss now, a Windows user should answer this. – jay.sf Oct 20 '22 at 14:17
  • hmm thanks for the help. I got a few more packages installed from this at least. I've asked my follow-up question as a separate question clarifying that I'm working on windows. – William Kozlowski Oct 21 '22 at 06:01

1 Answers1

1

I believe you use the wrong R and RTools combination:

Use Rtools 4.0 for any R Version below R 4.2.0 as the following page suggests:

https://cran.r-project.org/bin/windows/Rtools/

hyman
  • 315
  • 3
  • 13