r - Travis CI - knitr 和依赖项
问题描述
我正在为我的 CI 包使用 travis。我在 R 发行版和开发版的 Mac 上遇到错误。这些是我得到的错误:
在发布版本上:
Error in loadVignetteBuilder(pkgdir, TRUE) :
vignette builder 'knitr' not found
Execution halted
The command "R CMD build ." failed and exited with 1 during .
Your build has been stopped.
在开发版本上:
Installing packages into ‘/Users/travis/R/Library’
(as ‘lib’ is unspecified)
Error: (converted from warning) unable to access index for repository https://cloud.r-project.org/bin/macosx/el-capitan/contrib/4.0:
cannot open URL 'https://cloud.r-project.org/bin/macosx/el-capitan/contrib/4.0/PACKAGES'
Execution halted
The command "Rscript -e 'deps <- remotes::dev_package_deps(dependencies = NA);remotes::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 .
关于发布版本的错误,我在说明文件中指定了 Suggests: knitr 和 VignetteBuilder: knitr 。
开发版的错误我不明白。这似乎是 TRAVIS 上的一个错误。
这些是 travis yml 文件中的设置:
language: R
sudo: false
cache: packages
warnings_are_errors: true
os:
- linux
- osx
r:
- oldrel
- release
有什么建议么?
解决方案
需要安装 Rknitr
来构建包。也许你的基础环境中缺少这个包(我不熟悉 travis)。
您能否添加一个明确安装它的步骤,例如
R -e 'install.packages("knitr")'
推荐阅读
- pdf - 如何在 VueJS 中下载本地存储的 pdf
- excel - 设置一个宏来格式化活动单元格中的一行
- ios - AVAssetTrack 的资产属性有时为零
- python - 定义self.sock时,获取errors.python
- java - Scala:相当于 np.digitize 来分桶数据
- c++ - clang 实现 char8_t 的方式是否存在缺陷,或者标准的某些暗角是否禁止优化?
- bash - 如何 grep 序列并创建不同的文件?
- hibernate - 如何查找结果是否落在 lucene 索引中的两个日期之间?
- python-3.x - 检测字符串类型
- android - 如何在服务存活时多次启动服务