I’m facing a challenge with installing a specific version of R (4.1.0) on a Debian Bullseye Docker container. I’ve run into some obstacles and would really appreciate any guidance or solutions.
Current Situation:
I need to install R version 4.1.0 specifically.
The official R documentation for Debian (Link) Bullseye only offers two versions: 4.4.1 (most recent) and 4.0.4:
After I add the repo to debian using the official documentation guide, I get only the above mentioned versions:
I’ve attempted to download and compile R 4.1.0 from source, but it didn’t work as expected.
What I’ve Tried: I attempted to compile from source using the following method in my Dockerfile:
RUN wget https://cran.r-project.org/src/base/R-4/R-4.1.0.tar.gz && tar -xf R-4.1.0.tar.gz
&& cd R-4.1.0 && ./configure --with-x=no && make && make install &&
cd .. &&
rm -rf R-4.1.0 R-4.1.0.tar.gz
Unfortunately, this approach didn’t work correctly, I always get errors and project won’t even start.
Questions:
Is there a reliable method to install R 4.1.0 on a Debian Bullseye Docker container, I am not sure how can I do that .. but specifying the one of the versions while installing R seems to install the environment correctly:
RUN apt-get install r-base=4.0.4-1 -y
yet I want to use another version other that the two that are available?
Are there any specific considerations or dependencies I should be aware of when compiling R from source in this environment?
Has anyone successfully installed a non-standard R version on Debian Bullseye? If so, could you share your approach?
Any insights, suggestions, or alternative approaches would be greatly appreciated. Thanks in advance for your help!