无法在Travis上使用devtools安装R软件包

时间:2019-03-17 15:39:49

标签: r travis-ci devtools

Travis CI为drake R package manual recently started failing构建:

Downloading GitHub repo ropensci/drake@master
Error: Could not find tools necessary to compile a package
In addition: Warning message:
In get0(oNam, envir = ns) : internal error -3 in R_decompress1
Execution halted
The command "Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .

tried using the development versions of devtools and pkgloaderrors changed

$ Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'
Error in match.arg(upgrade, c("ask", "always", "never")) : 
  'arg' must be of length 1
Calls: <Anonymous> ... upgradable_packages -> resolve_upgrade -> match.arg
Execution halted
The command "Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .

当我also used the development version of remotes时:

$ Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'
drake     (ae093a068... -> 7f40fc6be...) [GitHub]
lazyeval  (0.2.1        -> 0.2.2       ) [CRAN]
polyclip  (1.9-1        -> 1.10-0      ) [CRAN]
purrr     (0.3.1        -> 0.3.2       ) [CRAN]
readxl    (1.3.0        -> 1.3.1       ) [CRAN]
rmarkdown (1.11         -> 1.12        ) [CRAN]
stringi   (1.3.1        -> 1.4.3       ) [CRAN]
tibble    (2.0.1        -> 2.1.1       ) [CRAN]
tinytex   (0.10         -> 0.11        ) [CRAN]
Installing 8 packages: lazyeval, polyclip, purrr, readxl, rmarkdown, stringi, tibble, tinytex
Error in if (type == "binary") { : argument is of length zero
Calls: <Anonymous> ... with_rprofile_user -> with_envvar -> force -> force -> i.p
Execution halted
The command "Rscript -e 'deps <- devtools::dev_package_deps(dependencies = NA);devtools::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .

我相信构建应该成功,至少要到实际手册开始运行为止。

2 个答案:

答案 0 :(得分:1)

remotes 2.0.3(现在在CRAN上)解决了这个问题。 Travis CI从那里得到它。

请参阅 https://github.com/r-lib/devtools/issues/2020

感谢吉姆·海斯特!

答案 1 :(得分:0)

我设法通过自己传递upgrade自变量:devtools::install_deps(dependencies = TRUE, upgrade="always")

在devtools 2.0.2中解决了这个问题