RStudio cannot find Rtools to build package

烈酒焚心 提交于 2020-01-11 11:34:25

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/50938412/rstudio-cannot-find-rtools-to-build-package

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!