3.2.1 Install Oracle R Distribution on Oracle Linux 8 Using Dnf

Oracle recommends using dnf to install Oracle R Distribution on Linux 8.

Dnf simplifies the installation of Oracle R Distribution by automatically resolving RPM dependencies.

To install Oracle R Distribution on Oracle Linux 8 Using Dnf:

  1. Log in to the Linux server as root and change to the /etc/yum.repos.d directory:

    cd /etc/yum.repos.d
  2. For Oracle Linux 8, in addition to the Oracle Linux 8 main repository, the appstream, codereadybuilder, and addons repositories are required. As root, create the repository /etc/yum.repos.d/oracle-linux-ol8.repo and specify enabled=1 for ol8_baseos_latest, o18_appstream, o18_codereadybuilder and ol8_addons.

    The result looks similar to the following:

    [ol8_baseos_latest]
    name=Oracle Linux $releasever BaseOS ($basearch)
    baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/$basearch
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
    gpgcheck=1
    enabled=1
    
    [ol8_appstream]
    name=Oracle Linux $releasever Application Stream ($basearch)
    baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/appstream/$basearch
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
    gpgcheck=1
    enabled=1
    
    [ol8_codereadybuilder]
    name=Oracle Linux $releasever Code Ready Builder ($basearch)
    baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/codeready/builder/$basearch
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
    gpgcheck=1
    enabled=1
    
    [ol8_addons]
    name=Oracle Linux $releasever Add ons ($basearch)
    baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/addons/$basearch/
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
    gpgcheck=1
    enabled=1
  3. As root, install R-4.0.5 for Linux 8 using the dnf command. Run the dnf command to install R.
    dnf install R-4.0.5
    .

Note:

In newer Oracle Linux versions, the yum package manager has been replaced by dnf package manager.