BoMikGo
BoMikGo

Reputation: 57

travis error: "package ‘devtools’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version"

I receive the following error from Travis after doing a git push:

Installing R packages from GitHub: jimhester/covr
$ Rscript -e 'devtools::install_github(c("jimhester/covr"), 
build_vignettes = FALSE)'

Error: package ‘devtools’ was installed by an R version with different 
internals; it needs to be reinstalled for use with this R version

Execution halted

More information you can find here: https://travis-ci.org/bozmik/genomation/jobs/315357710#L1125

Do you have any idea how to solve this issue?

Upvotes: 6

Views: 1607

Answers (2)

Martin Smith
Martin Smith

Reputation: 4077

I've encountering this issue separately and unfortunately Chaoran's solution didn't work for me.

The problem is that the devtools binary being called from the package cache was built under a different version of R than the one that Travis is using.

I was able to fix this by adding

r: devel

to my .travis.yml, forcing Travis to use the development version of R instead of the release channel. The devtools binary that's causing the problem has been compiled on this devel channel.

Upvotes: 0

Chaoran Hu
Chaoran Hu

Reputation: 103

You can add

r_packages:
  - devtools

before

r_github_packages:
  - jimhester/covr

This solve my problem.

Upvotes: 5

Related Questions