My builds started failing recently. I have devtools
in my r_packages
list. The build tries to install devtools
, which depends on usethis
, which depends on gert
, which fails to install:
* installing *source* package ‘gert’ ...
** package ‘gert’ successfully unpacked and MD5 sums checked
** using staged installation
Using PKG_CFLAGS=
Using PKG_LIBS=-lgit2
----------------------------- ANTICONF -------------------------------
Configuration failed to find libgit2 library. Try installing:
* brew: libgit2 (MacOS)
* deb: libgit2-dev (Debian, Ubuntu, etc)
* rpm: libgit2-devel (Fedora, CentOS, RHEL)
If libgit2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libgit2.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:18: fatal error: git2.h: No such file or directory
compilation terminated.
----------------------------------------------------------------------
ERROR: configuration failed for package ‘gert’
I have a simple config:
language: r
cache: packages
warnings_are_errors: false
r:
- bioc-release
- oldrel
- release
- devel
r_packages:
- covr
- devtools
- tidyverse
- shiny
after_success:
- Rscript -e 'library(covr); codecov()'
This is a fairly common package, but this does not seem to be a widespread problem. Why is this error happening for me?