Update: Be sure to check out the next post in this series: Securing R on Red Hat Enterprise Linux.
Some of my users need to be able to run the statistical programming language R on a few systems. Typically, installing software in the RHN environment is a piece of cake, but here, I ran into some trouble which was surprisingly poorly documented in the Interwebs.
Basically, R is not in the standard RHN repository. The instructions provided by CRAN (the Comprehensive R Archive Network) for installing R on Red Hat Enterprise Linux are given in a README file which is the only available resource in their “redhat” repository (http://cran.r-project.org/bin/linux/redhat/). As one can plainly read, the instructions are quite simple:
2) Red Hat Enterprise Linux (RHEL)
The Fedora RPMs for R have been ported to RHEL by the project Extra
Packages for Enterprise Linux (EPEL).
These RPMs are also compatible with distributions derived from RHEL.
To use the EPEL repository, it is sufficient to download and install
the appropriate “epel-release” RPM, as described in the EPEL FAQ:
Then R can be installed as described above in the section on Fedora.
Unfortunately, adding the EPEL repository and attempting the command “yum install R” results in an error:
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum localinstall epel-release-6-8.noarch.rpm yum install R ... --> Finished Dependency Resolution Error: Package: R-core-devel-3.1.1-3.el6.x86_64 (epel) Requires: lapack-devel Error: Package: R-core-devel-3.1.1-3.el6.x86_64 (epel) Requires: blas-devel >= 3.0 Error: Package: R-core-devel-3.1.1-3.el6.x86_64 (epel) Requires: libicu-devel Error: Package: R-core-devel-3.1.1-3.el6.x86_64 (epel) Requires: texinfo-tex
Well that’s obnoxious. Installing R from EPEL fails because neither the EPEL nor the RHN repositories have all of the prerequisite packages available.
Previously, I had instructed users to gather the missing packages above from the CentOS 6 repositories, but after doing a little digging, I found that the missing packages are in Red Hat’s rhel-6-server-optional-rpms. Just head into the /etc/yum.repos.d/redhat.repo file and enable the repository by changing the appropriate “enabled = 0” line to “enabled = 1”:
vim /etc/yum.repos.d/redhat.repo [rhel-6-server-optional-rpms] ... enabled = 1
Now, executing yum install R will work as expected, and you’re on your way to happy end users.
Note: User Fukamit below points us to the proper location for RHEL 6 Workstation users (it’s the rhel-6-workstation-optional-rpms repository), so if you’re running RHEL 6 Workstation, that’s the way to go.