首页 > 解决方案 > Travis CI 在 pkg-config 搜索路径中找不到包

问题描述

我最近开始在 Travis-CI ( https://travis-ci.org/TGuillerme/ )R十二月中旬后更新的各种软件包上遇到相同的错误。这特别奇怪,因为对于三个相关的包,更改不是任何代码更改(只有注释更改)但 Travis-CI 现在似乎无法使用运行包和覆盖的非常简单的文件安装一些包(即和) :magicklibgit2.ymlcodecov

language: r
warnings_are_errors: false

branches:
  only:
    - master
    - release
  except:
    - CRAN

# Code coverage
r_packages:
  - covr

after_success:
- Rscript -e 'library(covr); codecov(token = "5f041826-63f1-47fa-b4a8-9a32633f47fa")'

在这种情况下我得到的错误(尽管它因不同的包而异)与magick包有关:

** package ‘magick’ successfully unpacked and MD5 sums checked
Package Magick++ was not found in the pkg-config search path.
Perhaps you should add the directory containing `Magick++.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Magick++' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lMagick++-6.Q16

线 2625-2631

连同在此之前的一条可疑消息:

Unable to find the libgit2 library on this system. Building 'git2r'
using the bundled source of the libgit2 library.

线 1563-1564

我有什么明显的遗漏吗?有没有办法强制 Travis-CI 自动安装错误的包?

再说一次,这对我来说特别奇怪,因为自上次构建运行时所提交的运行代码更改并没有出现错误

标签: rtravis-ci

解决方案


我已经能够通过从他们的二进制文件安装包来解决类似的问题。

以下内容可能对 .travis.yml 有所帮助:

r_binary_packages:
    - libgit2
    - magick

推荐阅读