R can run scripts and statistical workloads from RPM packages on Fedora 44 or Red Hat Enterprise Linux 9. Both paths keep the runtime under DNF, but RHEL needs the community-maintained Extra Packages for Enterprise Linux (EPEL) repository before R-core becomes available.
Fedora provides R-core in its standard repositories. RHEL 9 instead needs an active Red Hat subscription, the matching CodeReady Linux Builder repository, and the EPEL 9 release package; using an EPEL release package for a different RHEL major version can create incompatible repository definitions.
The focused R-core package supplies a functional runtime without the full development and Java metapackages. EPEL is outside Red Hat's production support coverage, and packages that compile native code may also require R-core-devel plus system libraries; the final Rscript calculation proves either installed runtime can execute noninteractive R code.
Related: How to install an R package from CRAN
Related: How to set a user package library in R
Steps to install R on Fedora or Red Hat Enterprise Linux:
- Open a terminal with sudo privileges.
- Install the focused R runtime package on Fedora 44.
$ sudo dnf install -y R-core
Fedora does not need the three RHEL-only repository steps below.
- Enable CodeReady Linux Builder on a subscribed RHEL 9 host.
$ sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
This command deliberately selects RHEL major version 9. A different RHEL major version needs its corresponding CodeReady repository and EPEL release package.
- Add the EPEL 9 release package on RHEL 9.
$ sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
EPEL packages are maintained by the Fedora community and are not covered by Red Hat production support.
- Install the focused R runtime package on RHEL 9.
$ sudo dnf install -y R-core
The R metapackage adds the development and Java components for hosts that need the broader package set.
- Confirm the installed R-core package on Fedora 44.
$ rpm -q R-core R-core-4.6.1-1.fc44.aarch64
- Confirm the installed R-core package on RHEL 9.
$ rpm -q R-core R-core-4.6.1-1.el9.aarch64
The version, release, and architecture follow the enabled repositories and may differ after an update.
- Run a noninteractive R expression on the installed platform.
$ Rscript -e '2 + 2' [1] 4
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.