RStudio和Travis CI构建检查不匹配(libudunits2.so)

问题描述 投票:0回答:1

特拉维斯CI检测并发布Build > Check中的RStudio找不到我的lares库(在Github中找到laresbernardo / lares)。根据Travis CI的说法,我的最后一次“通过”提交实际上是一个拼写错误,所以图书馆的代码不应该是问题;所以,当我为库运行devtools::check()时,我得到了带有0个错误,警告或注释的漂亮的R CMD check succeeded消息。

我已经尝试了消息建议和其他东西:

  • 在终端(macOS)中运行brew install udunits
  • 使用install.packages(units)通过CRAN安装库
  • 并通过Github(dev)与devtools::install_github("r-quantities/units", args="--configure-args='--with-udunits2-lib=/usr/local/lib'")
  • devtools::install_github("r-quantities/units", args="--configure-args='--with-udunits2-include=/usr/include/udunits2'")

这是Travis CI日志的结束,也可以在这里找到:https://travis-ci.org/laresbernardo/lares

(...)
checking for ut_read_xml in -ludunits2... no
configure: error: in `/tmp/RtmpITNXhh/R.INSTALL3d3b9a0f951/units':
configure: error: 
--------------------------------------------------------------------------------
  Configuration failed because libudunits2.so was not found. Try installing:
    * deb: libudunits2-dev (Debian, Ubuntu, ...)
    * rpm: udunits2-devel (Fedora, EPEL, ...)
    * brew: udunits (OSX)
  If udunits2 is already installed in a non-standard location, use:
    --configure-args='--with-udunits2-lib=/usr/local/lib'
  if the library was not found, and/or:
    --configure-args='--with-udunits2-include=/usr/include/udunits2'
  if the header was not found, replacing paths with appropriate values.
  You can alternatively set UDUNITS2_INCLUDE and UDUNITS2_LIBS manually.
--------------------------------------------------------------------------------
See `config.log' for more details
ERROR: configuration failed for package ‘units’
* removing ‘/home/travis/R/Library/units’
Error in i.p(...) : 
  (converted from warning) installation of package ‘units’ had non-zero exit status
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 .
Your build has been stopped.

我没有想法。这是stringiunits图书馆的变化吗?还是特拉维斯CI问题?或者我库中的某些内容设置不同?

github build rstudio travis-ci units-of-measurement
1个回答
3
投票

解决了将以下内容添加到.travis.yml文件中!我必须指定需要安装此库。

addons:
  apt:
    packages:
      - libudunits2-dev

感谢units图书馆开发人员IñakiUcar提供了非常有用的答案。

© www.soinside.com 2019 - 2024. All rights reserved.