An R package works fine (and passes CRAN checks), but when Travis CI runs unit tests it errors with
Error: Required package curl not found. Please run: install.packages('curl')
Execution halted
This seems to be an issue particular to Ubuntu. I can see here that running sudo apt-get install libcurl4-openssl-dev
can fix the issue. The trouble is I don't have access to the Ubuntu console (as Travis CI does everything after I push to git) - can I place this code somewhere? E.g. can it go in .travis.yml
somehow, and if so, how?
The current .travis.yml
file is just 2 lines and looks like this
language: R
cache: packages
Note
Based on this question/answer, I tried adjusting .travis.yml
to
language: R
cache: packages
before_install:
- sudo apt-get install libcurl4-openssl-dev
I can see from the build logs that sudo apt-get install libcurl4-openssl-dev
ran, but the build errored in the same way as before regardless
Also note
I also tried
language: R
cache: packages
before_install:
-sudo apt-get update
Based on this suggestion, but the same error persisted