代码之家  ›  专栏  ›  技术社区  ›  Steffen Moritz

R Travis CI错误:包已建议但不可用:ridge

  •  0
  • Steffen Moritz  · 技术社区  · 7 年前

    我正在为我的一个R包运行Travis CI。问题是生成失败,并出现一个错误,指出包的一个依赖项不可用(名为“ridge”的包)

    * checking extension type ... Package
    * this is package ‘imputeR’ version ‘2.1’
    * checking package namespace information ... OK
    * checking package dependencies ... ERROR
    Package suggested but not available: ‘ridge’
    The suggested packages are required for a complete check.
    Checking can be attempted without them by setting the environment
    variable _R_CHECK_FORCE_SUGGESTS_ to a false value.
    See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
    manual.
    * DONE
    Status: 1 ERROR
    See
     ‘/home/travis/build/SteffenMoritz/imputeR/imputeR.Rcheck/00check.log’
    for details.
    0.38schecking package dependencies ... ERROR
    Package suggested but not available: ‘ridge’
    

    以下是Travis Build的链接: https://travis-ci.org/SteffenMoritz/imputeR/builds/436334069

    Travis无法使用的程序包是当前在CRAN上的正常程序包。这是否与Gnu Scientific Library版本相关山脊需要1.14。。?我能解决这个问题吗?

    2 回复  |  直到 7 年前
        1
  •  1
  •   Droplet    7 年前

    你说得对,这是因为ridge需要一个外部库(Gnu-Scientific-library),travis默认情况下没有安装这个库。

    Travis CI docs

    在您的情况下,您需要添加

    addons:
      apt:
        packages: libgsl0-dev
    

    给你的 .travis.yml

        2
  •  0
  •   Steffen Moritz    7 年前

    找到一个解决方案,至少让特拉维斯完成检查

    您可以将其添加到Travis配置yaml文件:

    env:
     global:
       - _R_CHECK_FORCE_SUGGESTS_: false
    

    据我所知,缺点是:包括建议的软件包在内的所有东西都没有经过检查。因此,解决方案并不完全令人满意。

    推荐文章