3.2.1 Dnfを使用したOracle Linux 8へのOracle R Distributionのインストール

Oracleでは、Linux 8にdnfを使用してOracle R Distributionをインストールすることをお薦めします。

Dnfを使用するとRPM依存性が自動的に解決されるため、Oracle R Distributionのインストールが簡略になります。

Dnfを使用してOracle Linux 8にOracle R Distributionをインストールするには:

  1. rootでLinuxサーバーにログインして、/etc/yum.repos.dディレクトリに変更します。

    cd /etc/yum.repos.d
  2. Oracle Linux 8では、Oracle Linux 8のメイン・リポジトリに加えて、appstream、codereadybuilderおよびアドオンのリポジトリが必要です。rootとして、リポジトリ/etc/yum.repos.d/oracle-linux-ol8.repoを作成し、ol8_baseos_latest o18_appstreamo18_codereadybuilderおよびol8_addonsenabled=1を指定します。

    結果は次のようになります:

    [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. rootとして、dnfコマンドを使用してLinux 8用のR-4.0.5をインストールします。dnfコマンドを実行してRをインストールします。
    dnf install R-4.0.5
    .

ノート:

新しいOracle Linuxバージョンでは、yumパッケージ・マネージャがdnfパッケージ・マネージャに置き換えられました。