Rtools not found after R 4.0.0 installation

After installing R 4.0.0, I got a message that Rtools was out of date. I installed the new version of Rtools and now get the message:

WARNING: Rtools is required to build R packages but is not currently installed.

I tried setting the path as suggested as a previous fix (Sys.setenv(PATH = paste(Sys.getenv("PATH"), "C:\RTools40", "C:\RTools40\mingw64\bin", sep = ";")), etc.). This did not work.

Can anyone help with this?

Hi @Sookies_Dad,
Welcome to the RStudio Community Forum.

The "\" character is an "escape" character in R; it has special meaning and so cannot be used singly in Windows directory paths. Try this:

# What's in the old PATH?

Sys.setenv(PATH = paste(Sys.getenv("PATH"), 
                        sep = ";"))
# Did it work (look at the end)?


Thank you for the help. However, it did not solve the problem.

In addition to this, I changed my "PATH" variable to include the RTools installation:

[1] "C:\Program Files\R\R-4.0.0\bin\x64;C:\Program Files\Python38\;C:\Program Files\Python38\Scripts\;C:\Python27\;C:\Python27\Scripts;C:\RTools40\;C:\RTools40\mignw64\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin"

I am still getting the same error: "WARNING: Rtools is required"

I updated R in my system without any problem, though I changed permanently for my user instead of just for the R session. I mentioned my steps here. Can you check whether those work for you or not?

1 Like

Thanks. Adding "C:\RTools40\usr\bin" to my PATH fixed it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.