1

I am trying to build my first R package (GitHub link). It is currently passing all local checks with devtools::check(), but failing on Travis:

ERROR: dependency ‘Rmpfr’ is not available for package ‘streamDepletr’

Looking at the Installed package versions section of the travis-ci output, Rmpfr is not listed. However, my DESCRIPTION file includes it as an import:

Imports:
  Rmpfr,
    dplyr,
    magrittr

and Rmpfr is available on CRAN; my question is, how do I get travis-ci to install it?

The solution may be related to this previous question where the author had to include Java in their .travis.yml file. For Rmpfr, it looks like the MPFR C library is necessary. Is there a way to instruct travis to install this library in my .travis.yml file? Or am I barking up the wrong tree?

Sam Zipper
  • 642
  • 1
  • 7
  • 19

1 Answers1

2

As you found out, you need the libmpfr-dev package to be installed. You can do this by adding

addons:
  apt:
    packages:
      - libmpfr-dev

to your .travis.yml. See the documentation for reference.

Ralf Stubner
  • 26,263
  • 3
  • 40
  • 75