简体   繁体   中英

Rtools 3.5 not recognized?

I just installed R3.5 (and RStudio) on a new computer that has not previously had R on it. I then installed the devtools package, and when I went to install a package off of github, I realized (when prompted!) I had forgotten to install Rtools, so I followed the prompts to do so. Interestingly, this R tools installed to the directory of C:\\RBuildTools by default and with no prompts for setting path variables as I had recalled in previous versions.

When I reloaded R, I was prompted to install Rtools again. My path contained no reference to Rtools (or the Rbuildtools directory), and remembering that my past installations had used the dir C:\\Rtools, I decided to uninstall C:\\RBuildTools and installed a fresh version off http://cran.r-project.org/bin/windows/Rtools/ ( installed version 3.5) into C:\\Rtools. In installation I had the path variable option checked.

I reloaded RStudio and checked to make sure Rtools was found:

> devtools::find_rtools()
Error in system(full, intern = TRUE, ignore.stderr = quiet, ...) : running command '"C:/PROGRA~1/R/R-35~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD config CC' had status 2

However, rtools appears in my PATH:

> Sys.getenv("PATH")
[1] "C:\\Program Files\\R\\R-3.5.0\\bin\\x64;C:\\Rtools\\bin;..."

So this doesn't appear to be an issue with Rtools not being added properly to my Path variable. Google searches have turned up seemingly related errors but nothing so far that solves my issue. I have tried both suggestions here and neither have worked. I wonder if this could be related to RStudio.

I had a similar problem with RTools 3.5.
The installer did add C:\\RTools\\bin to the PATH, but it did not add
C:\\RTools\\mingw_64\\bin which apparently did cause some confusion.

After adding C:\\RTools\\mingw_64\\bin to the PATH, everything was fine.

My symptoms were a bit different though: RStudio reported an error when trying to "Install and Restart" my package that RTools were not found, while devtools::find_rtools() reported them to be present.

I have a comprehensive answer here for rtools not being recognized thru use of pkgbuild

`devtools::install_github(repo)` keeps installing rtools35.exe

The code snippet acknowledges the github comment this is posted (helped by r-sig-finance citizens)

However, (I can't comment) the error of find_tools() has disappeared but remains in devtools::install_bitbucket() for the new code that was the ultimate target and is in a src/master on BB cloud.

I unloaded the devtools and installed with remotes

unloadNamespace("devtools")
library(remotes)
install_bitbucket(author/repo)

As I said the problem with find_tools is taken care of by pkgbuild loading all items

Try updating RStudio to the latest version.

I had this problem after updating Rtools to 3.5 and found that updating RStudio to 1.1.447 fixed it.

If that doesn't work, Can you run rstudioapi::versionInfo()$version from inside RStudio and share the output?

If this isn't your problem I found that RStudio keeps a log - and it helped me isolate this issue. In my case the file was located in, "C:\\Users\\my_windows_username\\AppData\\Local\\RStudio-Desktop\\log\\rsession-my_windows_username.log"

I found this warning in the log time that corresponed to the error in RStudio

WARNING Unknown Rtools version: 3.5; LOGGED FROM: rstudio::core::Error rstudio::core::r_util::scanRegistryForRTools(HKEY, bool, std::vector*) C:\\Users\\Administrator\\rstudio\\src\\cpp\\core\\r_util\\RToolsInfo.cpp:269

This indicated that RStudio didn't recognize 3.5, which led me to check for an updated version of RStudio.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM