Search code examples
ramazon-web-servicesamazon-emramazon-linux

How to install R language version 4 in AWS EMR - Amazon linux 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 ?


Solution

  • 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