RStudio找不到Rtools来构建软件包

时间:2018-06-19 23:58:01

标签: r rstudio rtools

我在Windows 10计算机上安装了R 3.5.0和Rtools 3.5。运行devtools::find_rtools()会产生TRUE,但是当我尝试检查并构建正在处理的程序包时,出现错误:

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/

基于此link,我运行了以下命令,但得到了相同的错误:

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

如何使Rtools被认可以构建软件包?

1 个答案:

答案 0 :(得分:3)

原来,我还需要将c:\Rtools\mingw_64\bin;添加到我的PATH中。