0

devtools::install_github(repo)不断安装 rtools35.exe

我尝试从“author/newrepo”安装一个新的作者帐户存储库,并不断收到 R 想要安装新的 buildtools 消息。然后安装退出。Rtools35.exe 安装已经完成。我目前正在使用旧版本的 R (3.5.0),因为 RTools 不适用于 3.5.1 更新

`devtools::install_github(repo)` 

 Downloading bitbucket repo author/repo@master
 trying URL 'https://cran.rstudio.com/bin/windows/Rtools/Rtools35.exe'
 Content type 'application/x-msdos-program' length 108622512 bytes (103.6 
  MB)
  downloaded 103.6 MB

Error in system(full, intern = TRUE, ignore.stderr = quiet, ...) : 
 running command '"G:/Program Files/R/R-3.5.0/bin/x64/R" --no-site-file     
 --no-en viron --no-save --no-restore --quiet CMD config CC' had status 2

我之前在 3.5.1 中尝试remotes过并打开了 Quiet,打开了 Dependencies

remotes::install_bitbucket(account/repo,author,quiet=TRUE,dependencies=FALSE)

但我在 Rtools 错误后不断得到 Rtools。

我应该试试source()

我应该等待新作者 repo 的完整压缩包吗?

作者的来源可~src/masterbitbucket

4

1 回答 1

1

以下代码可确保识别 rtools35.exe。请注意,您必须安装pkgbuild才能在加载后安装工具devtools,加载pkgbuild然后find_tools()解析为 true 允许您希望安装的源代码

##    code from https://github.com/r-lib/devtools/issues/1772#issuecomment-384406969          ##

install.packages("pkgbuild","G:/Program Files/R/R-3.5.1/library") # pkgbuild is not available (for R version 3.5.0)
install.packages("devtools","G:/Program Files/R/R-3.5.1/library") # make sure you have the latest version from CRAN
library(devtools, lib.loc="G:/Program Files/R/R-3.5.1/library") # load package
devtools::install_github("r-lib/pkgbuild") # install updated version of pkgbuild from GitHub
library(pkgbuild, lib.loc = "G:/Program Files/R/R-3.5.1/library") # load package
find_rtools() # should be TRUE, assuming you have Rtools 3.5
于 2018-08-29T18:01:43.640 回答