[R-sig-Debian] Installing R 4.1.2 doesn't work as it did a week ago
Dirk Eddelbuettel
edd @end|ng |rom deb|@n@org
Mon May 2 23:13:57 CEST 2022
On 2 May 2022 at 13:52, Chad Young wrote:
| I have a docker file for installing R on Ubuntu 18.04, and as of last week
| it is failing. I think it seems to be related to the recent release of R
| 4.2.0. I want to install R 4.1.2, but when I use the below command and then
| check the R version, it comes out as 4.2.0. Do you know why this is
| happening?
|
| RUN apt-get update \
| && apt-get install -y gnupg2 software-properties-common \
| && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
| E298A3A825C0D65DFD57CBB651716619E084DAB9 \
| && add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu
| bionic-cran40/' \
| && apt-get update \
| && apt-get install -y \
| r-base=4.1.2-* \
| r-recommended=4.1.2-*
|
| If I just install r-base-core=4.1.2-* it seems to install the correct
| version of R.
You were close. You need three lines at the end:
&& apt-get install -y \
r-base=4.1.2-* \
r-base-core=4.1.2-* \
r-recommended=4.1.2-*
This has to do with a fact that such an imposed version does apparently _not_
get pushed through to the versions pulled in the by the packages you
constrained. In other words, while 'r-base' gets fixed, the 'r-base-core' is
still "free" meaning you get the newest as `apt` tries to be helpful.
Dirk
--
dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
More information about the R-SIG-Debian
mailing list