2

We have an AWS EMR cluster. By default it comes with

Amazon Linux version 2
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"

I like to install latest R version 4..

Tried following :

yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install R

But it doesn't upgrade R version to v4.0. It only offers to upgrade it to 3.4.3-1.amzn2.0.1

Amazon Linux 2 - uses EPEL version 7. EPEL v7 doesn't seem to have R v4. But EPEL version 8 has R v4

I am planning to install R from source. But like to know if this is a way to install binary.

Is there any option to install latest R binary on AWS Linux 2 ?

Sairam Krish
  • 10,158
  • 3
  • 55
  • 67

2 Answers2

4

Found a way to install the R v4 binary from AWS extras repo

sudo amazon-linux-extras install R4

In future, if some one is hunting for AWS Linux specific software package., this command list the packages that can be installed from AWS extras

amazon-linux-extras list

Reference - Amazon Linux User Guide

Sairam Krish
  • 10,158
  • 3
  • 55
  • 67
1
  1. Install miniconda https://docs.conda.io/en/latest/miniconda.html
  2. conda install r-base or conda install r-essentials
abalter
  • 9,663
  • 17
  • 90
  • 145
  • 1
    Thanks for the answer. I couldn't make peace with installing miniconda just to install another package. – Sairam Krish Feb 23 '21 at 21:57
  • 1
    You will love using conda. Use it to install anything analysis-wise (other than general system tools). Your libraries and packages will all be harmonized. Also installing via conda is MUCH faster than `install.packages` which builds from source. – abalter Feb 23 '21 at 22:00
  • You can use Rstudio Package Manager public for specific linux like centos 7 or centos 8 and install packages from binaries instead source. https://packagemanager.rstudio.com/client/#/repos/1/overview – joscani Mar 07 '22 at 06:41
  • I don't think you can beat conda for reliability and flexibility. It's becoming more and more standard (as in packages saying to install that way) and it's cross platform. And reproducible. `conda env export -n myenv > myenv.yml`. `conda create -n myenv -f myenv.yml`. – abalter Mar 07 '22 at 19:49