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
- Download the tar.gz for specific version
- Extract using
tar zxvf myapp.tar.gz
- cd into the directory by step 2
- 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
Ggplot2 Ggsave Function Causes Graphics Device to Not Display Plots
How to Simulate Bimodal Distribution
Add Points to Usmap with Ggplot in R
R: Xmleventparse with Large, Varying-Node Xml Input and Conversion to Data Frame
Use Different Font Sizes for Different Portions of Text in Ggplot2 Title
Adding an Image to Shiny Action Button
Error in Dev.Off(): Cannot Shut Down Device 1 (The Null Device)
Staggered and Stacked Geom_Bar in The Same Figure
Find If Each Row of a Logical Matrix Has at Least One True
How to Force Ggplot's Geom_Tile to Fill Every Facet
How to Set R to Default Options
R Aggregate Data.Frame with Date Column
Change The Year in a Datetime Object in R
How to Make Install.Packages Return an Error If an R Package Cannot Be Installed
Single Legend When Using Group, Linetype and Colour in Ggplot2