R volunteers currently maintain Ubuntu package repositories for R ~3.5 and ~4.0. For Bionic Beaver, these are:
- https://cloud.r-project.org/bin/linux/ubuntu/bionic-cran35/
- https://cloud.r-project.org/bin/linux/ubuntu/bionic-cran40/
I am building separate Singularity containers, into which I need very specific versions of R installed; which appear to be provided in these repositories. Specifically, I'm looking to build containers containing R versions 3.6.1, 4.0.3 and 4.1.0; one container per version.
I do this, in the container build script, by first adding the appropriate Apt source, then running the install with a pinned version. I noticed that I could only get it to run if I use the precise version numbers listed in the package repository and also include r-recommended
at the same version. For example, for R 3.6.1:
apt install -y r-base=3.6.1-3bionic r-recommended=3.6.1-3bionic
This correctly installs r-base
and r-recommended
at the given versions. However, when I run the containerised R, R is actually reporting itself to be at the latest version provided by those repositories (3.6.3, 4.1.0 and 4.1.0, respectively). Presumably, given r-base
is correct, this may even suggest them to be in a broken state.
Looking through Apt's output, it's clear that many other r-*
packages are defaulting to the latest versions, rather than the versions I specified. In an attempt to get around this, I tried explicitly setting the versions on all the packages that are defaulting to the latest version. For example, again with R 3.6.1:
apt install -y r-base=3.6.1-3bionic \
r-base-core=3.6.1-3bionic \
r-base-dev=3.6.1-3bionic \
r-base-html=3.6.1-3bionic \
r-doc-html=3.6.1-3bionic \
r-recommended=3.6.1-3bionic
However, this refuses to work, complaining about conflicts with other packages it's trying to install (r-cran-*
packages, IIRC).
I don't know if this is an Apt-thing, an R-thing, or something to do with their repositories. Is there a way I can get these specific versions installed from the official sources, without having to build anything myself? (If not, what's the point of them keeping the older versions in their repositories?)