rhub icon indicating copy to clipboard operation
rhub copied to clipboard

Error running rhub::local_check_linux --

Open vnijs opened this issue 5 years ago • 4 comments

CRAN Identified a NoLD issue in one of my R-packages. I'm trying to figure out a way to test the effect of changes and stumbled onto local_check_linux. I use docker on macOS and Linux so this seemed like a good solution. However, I first ran into issues with installing sysreqs which were resolved after adding a newline to the end of .Rprofile. Then I got stuck on the command below. I didn't see an option to avoid using bioconductor. Could that perhaps be added as an option?

> source('https://bioconductor.org/biocLite.R')
Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
Execution halted
Error in run(bash, c(file.path(wd, "rhub-linux.sh"), args), echo = TRUE,  : 
  System command 'bash' failed, exit status: 1, stdout & stderr were printed
Type .Last.error.trace to see where the error occured

FYI I also tried rhub::check(".", platform = "debian-gcc-devel-nold") from the package directory but after more than 2 hours it was still not showing any output. Repo is https://github.com/radiant-rstats/radiant.model in case you are interested

Thanks!

vnijs avatar Jul 24 '20 01:07 vnijs

FYI rhub::check(".", platform = "debian-gcc-devel-nold") did eventually work but it took > 13 hours

vnijs avatar Aug 03 '20 19:08 vnijs

Hi, thanks for the effort put in this package. It is a great project!

I can confirm the same problem in Arch Linux 5.9.3 with R 4.0.3-1. Basically, any linux image fails on the step listed above:

> library(rhub)
> local_check_linux(getwd(), image = "rhub/debian-gcc-release")
>>>>>==================== Starting Docker container
8e676f6d45f0285f7b473dd1e7a60ddb19f8cc9e75135239c60aea11fca43233
ls: cannot access '/opt/R-*': No such file or directory
> source('https://bioconductor.org/biocLite.R')
Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
Execution halted

I also tried to use the images provided on docker hub directly to build and test the package, but to my surprise, they don't have R installed (R appears to be installed on the go on the container by the host). Is that so?

nettoyoussef avatar Nov 17 '20 14:11 nettoyoussef

The error in question can be corrected by changing the lines of the script rhub-linux-docker.sh from (lines 40-42):

    "$RBINARY" -q -e "source('https://bioconductor.org/biocLite.R')"
    echo "options(repos = BiocInstaller::biocinstallRepos())" >> ~/.Rprofile
    echo "unloadNamespace('BiocInstaller')" >> ~/.Rprofile

to

    "$RBINARY" -q -e "install.packages('BiocManager');"
    echo "options(repos = BiocManager::repositories())" >> ~/.Rprofile
    echo "unloadNamespace('BiocManager')" >> ~/.Rprofile

It makes sense to create an if flag, since BiocManager only works for R>=3.6.

For other people reading this issue, the file rhub-linux-docker.sh can be found by doing the code below in a R prompt:

system.file(package = "rhub", "bin", "rhub-linux-docker.sh")

nettoyoussef avatar Nov 17 '20 14:11 nettoyoussef

The change proposed by @nettoyoussef is actually implemented as of 4471f797d2a257320c74030a18b58c996a3cc633.

jolars avatar Mar 17 '21 08:03 jolars

This issue is about the previous R-hub system, it does not apply to the new system, so I am closing it now. Please see https://r-hub.github.io/rhub/ for the new system, R-hub v2.

gaborcsardi avatar May 09 '24 12:05 gaborcsardi