1

I managed to install the following package on my local RStudio session:

install.packages("devtools")
devtools::install_github("tidyverse/googlesheets4")

I am now trying to install it directly in the Dockerfile of my RStudio session on my server. For that, below the line:

RUN R -e "install.packages(c('DT', 'shiny', 'DBI', 'devtools'))"

I have added:

RUN R -e "devtools::install_version('tidyverse/googlesheets4')"

But when I launch the docker-compose up -d command I get this error:

Error in package_find_repo(package, repos) : couldn't find package 'tidyverse/googlesheets4' Calls: ... -> download_version_url -> package_find_repo Execution halted ERROR: Service 'rstudio' failed to build: The command '/bin/sh -c R -e "devtools::install_version('tidyverse/googlesheets4')"' returned a non-zero code: 1

Do you know what could be the issue? Thanks a lot.

zx8754
  • 52,746
  • 12
  • 114
  • 209
ML_Enthousiast
  • 1,147
  • 1
  • 15
  • 39
  • Why are you running `install_github` locally but `install_version` in the docker? If you also ran `install_github` that should be fine. Also [googlesheets4 is not on CRAN](https://cran.r-project.org/package=googlesheets4) so you don't even need to use the github version unless you specifically need the dev version of the package. – MrFlick Apr 08 '20 at 20:21
  • I need the dev version because I need a specific function that was recently developed. So I should do instead in Dockerfile `RUN R -e "devtools::install_github('tidyverse/googlesheets4')"` ? – ML_Enthousiast Apr 08 '20 at 20:55
  • Yes. That should work. – MrFlick Apr 08 '20 at 20:56
  • I made a typo but you were faster than my correction. I am trying now. Thx – ML_Enthousiast Apr 08 '20 at 20:56
  • I got this error after doing `docker-compose up -d` >>> ERROR: Service 'rstudio' failed to build: The command '/bin/sh -c R -e "devtools::install_github('tidyverse/googlesheets4')"' returned a non-zero code: 1 – ML_Enthousiast Apr 08 '20 at 21:50
  • Can you devtools::install_github for any other packages? Have you set up a proper build environment on that machine so devtools can work? What type of docker image is this? – MrFlick Apr 08 '20 at 21:52
  • This is my Dockerfile: `FROM rocker/tidyverse:3.6.1 RUN mkdir -p /rstudio RUN mkdir -p /rscripts RUN R -e "install.packages(c('Rselenium','httr','rvest','DBI','RPostgres','shiny','devtools'))" RUN R -e "devtools::install_github('tidyverse/googlesheets4')"` – ML_Enthousiast Apr 08 '20 at 23:21

0 Answers0