Error: package built with the wrong R version

I am seeing the following error with R oldrel:

Error: (converted from warning) package ‘ggplot2’ was built under R version 3.6.3
Execution halted
ERROR: lazy loading failed for package ‘ggrepel’
* removing ‘/home/travis/R/Library/ggrepel’
Error in i.p(...) : 
  (converted from warning) installation of package ‘ggrepel’ had non-zero exit status
Calls: <Anonymous> ... with_rprofile_user -> with_envvar -> force -> force -> i.p
Execution halted
travis_time:end:0a0db240:start=1588092618310782474,finish=1588092880536220170,duration=262225437696,event=
e[0Ke[31;1mThe command "Rscript -e 'deps <- remotes::dev_package_deps(dependencies = NA);remotes::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .e[0m

Your build has been stopped.

I am also seeing a similar error with R release:

Error: package ‘ggplot2’ was installed before R 4.0.0: please re-install it
Execution halted
ERROR: lazy loading failed for package ‘cowplot’
* removing ‘/home/travis/R/Library/cowplot’
Error in i.p(...) : 
  (converted from warning) installation of package ‘cowplot’ had non-zero exit status
Calls: <Anonymous> ... with_rprofile_user -> with_envvar -> force -> force -> i.p
Execution halted
travis_time:end:1df74700:start=1588092624435612141,finish=1588092640103849421,duration=15668237280,event=
e[0Ke[31;1mThe command "Rscript -e 'deps <- remotes::dev_package_deps(dependencies = NA);remotes::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .e[0m

Your build has been stopped.

Is it related to using r_binary_packages in my Travis config? Is there a way to resolve this?

1 Like

i’m getting the same behavior. Any updates here?

I ended up removing binary packages, but I also had to make a few other modification for R 4.0.0 compatibility. I get a successful build with oldrel and release now, but it’s hard to say which action solved this specific issue.

Please link to a build when reporting issues. An excerpt is not enough for diagnostics.

I am having the same issue with multiple “Error: package … was installed before R 4.0.0: please re-install it” occurrences.

Full logs here:

R release: https://travis-ci.org/github/hugomflavio/actel/jobs/686276887
R devel: https://travis-ci.org/github/hugomflavio/actel/jobs/686276889

I am “learning as I go”, so any help on fixing this to get Travis back up would be great.

Thanks.

Looks like a duplicate of

2 Likes

Indeed it is.

When I last checked that thread, the only suggestion was to delete the cache (which I did not have). But I can see that new suggestions were made in the meantime, and disabling the requirement to install binary packages solved the issue.

Travis is back up and running, thanks!

2 Likes
Imprint