Install Previous Versions of R on Ubuntu

Installing a specific version of R from an Apt repository

Thanks to @Chris' tip-off, the structure of said R packages is important to understand.

r-base is a metapackage which includes, amongst other things, r-base-core and r-recommended. r-recommended is another metapackage which includes a suite of recommended R packages, which introduce the incompatibility when trying to pin to versions.

For just the R binaries and the documentation, pinned to a specific ${VERSION}, this will do the trick:

apt install -y --no-install-recommends \
r-base-core=${VERSION} \
r-base-html=${VERSION} \
r-doc-html=${VERSION}

If you want to build packages, you'd also want r-base-dev=${VERSION} in there.

how to install R 3.5.0 (old version ) on ubuntu 18.04

The Ubuntu repositories seem to have only the 3.5.2 version, so this older version you would only find over CRAN:

https://cran.r-project.org/bin/linux/ubuntu/bionic-cran35/

There you have the r-base 3.5.0, AND you've got to resolve any dependency by hand, although the apt should give you what it needs. Some of the dependencies that my apt returns that I need here:

  • r-base-core_3.5.0-1bionic_amd64.deb
  • r-base-core-dbg_3.5.0-1bionic_amd64.deb
  • r-base_3.5.0-1bionic_all.deb
  • r-recommended_3.5.0-1bionic_all.deb

Maybe your apt asks you for other dependencies and brokens out the installation, just download them from the link above and redo the install.

BTW, for installing files already downloaded in your PC through terminal:

sudo apt install ./name-of-the-base-file.deb OR
sudo apt install /path/for/the/file/here/name-of-the-base-file.deb

How to install a specific R version in ubuntu

You will need to build from source. Using this post as guideline: https://unix.stackexchange.com/questions/173/how-to-compile-and-install-programs-from-source

  1. Download the tar.gz for specific version
  2. Extract using tar zxvf myapp.tar.gz
  3. cd into the directory by step 2
  4. run ./configure && make && sudo make install

Install particular version(2.15.2) of r-base on ubuntu

Find the solution.

I need to install like:

sudo apt-get install r-base-core=2.15.3-1precise0precise1
sudo apt-get install r-recommended=2.15.3-1precise0precise1
sudo apt-get install r-doc-html=2.15.3-1precise0precise1
sudo apt-get install r-base=2.15.3-1precise0precise1


Related Topics



Leave a reply



Submit