【问题标题】:RStudio and Travis CI build check do NOT match (libudunits2.so)RStudio 和 Travis CI 构建检查不匹配 (libudunits2.so)
【发布时间】:2019-07-07 17:57:18
【问题描述】:

Travis CI 检测到我的RStudio 中的Build > Check 未找到的问题并发出问题我的lares 库(在Github 中作为laresbernardo/lares 找到)。根据 Travis CI 的说法,我最后一次“通过”提交实际上是一个错字更改,因此库的代码不应该是问题;因此,当我为库运行 devtools::check() 时,我会收到带有 0 个错误、警告或注释的漂亮 R CMD check succeeded 消息。

我也尝试过消息的建议和其他内容:

  • 在终端 (macOS) 中运行 brew install udunits
  • 通过 CRAN 使用 install.packages(units) 安装库
  • 并通过 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 库的变化吗?还是 Travis CI 问题?或者我的图书馆里有什么不同的设置?

【问题讨论】:

    标签: github build rstudio travis-ci units-of-measurement


    【解决方案1】:

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

    addons:
      apt:
        packages:
          - libudunits2-dev
    

    感谢 units 库的开发者 Iñaki Ucar 提供了非常有用的答案。

    【讨论】:

    • 您能否详细说明此部分需要添加到.travis.yml 文件的位置。目前,我的文件只是:language: R cache: packages
    • 真的在任何地方......只要低于那条线就可以了@ChintanPathak
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多