1

I have R 3.5.0 and Rtools 3.5 installed on a Windows 10 machine. Running devtools::find_rtools() yields TRUE but when I try to check and build a package I'm working on, I get the error:

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/

Based on this link I ran the following commands but get the same error:

Sys.setenv(PATH = paste("C:/Rtools/bin", Sys.getenv("PATH"), sep=";"))
Sys.setenv(BINPREF = "C:/Rtools/mingw_$(WIN)/bin/")

How can I get Rtools to be recognized to build a package?

Phil
  • 7,287
  • 3
  • 36
  • 66
Gaurav Bansal
  • 5,221
  • 14
  • 45
  • 91

2 Answers2

4

Turns out I needed to add c:\Rtools\mingw_64\bin; to my PATH as well.

Gaurav Bansal
  • 5,221
  • 14
  • 45
  • 91
0

I hit this issue when running R-devel. It turned out that R was looking for a newer version of Rtools: the R-devel build I was running was updated to look by default for an updated version of Rtools.

Martin Smith
  • 3,687
  • 1
  • 24
  • 51