简体   繁体   English

找不到 Rtools 来构建 package

[英]Cannot find Rtools to build package

I have R 3.5.0 and Rtools 3.5 installed on a Windows 10 machine.我在 Windows 10 机器上安装了 R 3.5.0 和 Rtools 3.5。 Running devtools::find_rtools() yields TRUE but when I try to check and build a package I'm working on, I get the error:运行devtools::find_rtools()产生TRUE但是当我尝试检查并构建我正在处理的 package 时,出现错误:

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?如何让 Rtools 被识别以构建 package?

Turns out I needed to add c:\\Rtools\\mingw_64\\bin; 结果我需要添加c:\\Rtools\\mingw_64\\bin; to my PATH as well. 我的路径也是如此。

I hit this issue when running R-devel.我在运行 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.事实证明,R 正在寻找更新版本的 Rtools:我正在运行的 R-devel 构建已更新为默认查找 Rtools 的更新版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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