3.2.3 Install Oracle R Distribution on Red Hat Enterprise Linux

Instructions on rebuilding the Oracle R Distribution RPMs on a Red Hat Linux system.

The Oracle Linux RPMs can be installed on Red Hat Linux systems. However, if you want to rebuild the Oracle R Distribution RPMs on a Red Hat Linux system, follow these instructions.

To install Oracle R Distribution on Red Hat Enterprise Linux:

  1. Create an RPM build directory structure:

    mkdir -p /rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
    
  2. Set up RPM tools to use your own build tree (to avoid root):

    echo '%_topdir %(echo $HOME)/rpmbuild' > /.rpmmacros
    
  3. From Oracle public yum, download the source RPM (Rversion.elx.src.rpm where Rversion is the R version you are using and x is the Oracle Linux version you are using).

    Save the source RPM to the rpmbuild/SRPMS directory.

  4. Rebuild Red Hat Enterprise Linux using rpmbuild.

    rpmbuild --rebuild /rpmbuild/SRPMS/R-Rversion.elx.src.rpm

    Note:

    If any dependencies are missing, install them as root.

    The binary RPMs are built and saved under /rpmbuild/RPMS.

  5. Log in as root and execute these commands to install R:

    # rpm -i path/rpmbuild/RPMS/R-Rversion.elx.x86_64.rpm 
    # rpm -i path/rpmbuild/RPMS/R-core-Rversion.elx.x86_64.rpm 
    # rpm -i path/rpmbuild/RPMS/libRmath-Rversion.elx.x86_64.rpm 
    # rpm -i path/rpmbuild/RPMS/libRmath-devel-Rversion.elx.x86_64.rpm 
    # rpm -i path/rpmbuild/RPMS/libRmath-static-Rversion.elx.x86_64.rpm 
    # rpm -i path/rpmbuild/RPMS/R-devel-Rversion.elx.x86_64.rpm
    

    For example, this command installs R-3.6.1 on Red Hat Enterprise Linux x86-64 version 7, where the path to rpmbuild is /user/home/.

    rpm -i /user/home/rpmbuild/RPMS/x86_64/R-core-3.6.1-1.el7.x86_64.rpm