CSCfi / rstudio-openshift

MIT License
7 stars 15 forks source link

Warning: Packages not available for this version of R #13

Open pitkant opened 7 months ago

pitkant commented 7 months ago

Building process of Dockerfile related to row 33 of the Dockerfile

install2.r -e shiny rmarkdown shinythemes shinydashboard && \

fails sporadically with the following error message

Warning: unable to access index for repository https://packagemanager.posit.co/cran/__linux__/focal/2022-04-21/src/contrib:
cannot open URL 'https://packagemanager.posit.co/cran/__linux__/focal/2022-04-21/src/contrib/PACKAGES'
Error: packages ‘shiny’, ‘rmarkdown’, ‘shinythemes’, ‘shinydashboard’ are not available for this version of R
 
Versions of these packages for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
In addition: Warning message:
packages ‘shiny’, ‘rmarkdown’, ‘shinythemes’, ‘shinydashboard’ are not available for this version of R

Rebuilding the container after a few minutes usually helps but this is annoying nonetheless.

Also I'm wondering why someone has chosen to use a snapshot repository containing so badly outdated packages. It makes installing anything recent a pain. It's annoying that I have to manually change the repository in RStudio:

r <- getOption("repos")
       r["CRAN"] <- "https://cran.r-project.org" 
       options(repos=r)
pitkant commented 7 months ago

Actually now that I tried several times to rebuild studio I encountered the same problem time and time again. Only removing the project and then creating a new project with the same settings solved this.