Skip to content
Switch branches/tags


This repository orchestrates tools to produce R binaries. The binaries are available as a community resource, they are not professionally supported by RStudio. The R language is open source, please see the official documentation at

These binaries are not a replacement to existing binary distributions for R. The binaries were built with the following considerations:

These binaries have been extensively tested, and are used in production everyday on RStudio Cloud and Please open an issue to report a specific bug, or ask questions on RStudio Community.

Supported Platforms

R binaries are built for the following Linux operating systems:

  • Ubuntu 18.04, 20.04, 22.04
  • Debian 9, 10, 11
  • CentOS 7
  • Red Hat Enterprise Linux 7, 8
  • openSUSE 42.3, 15.3
  • SUSE Linux Enterprise 12, 15 SP3

Operating systems are supported until their vendor end-of-support dates, which can be found on the RStudio Platform Support page. When an operating system has reached its end of support, builds for it will be discontinued, but existing binaries will continue to be available.

Quick Installation

To use our quick install script to install R, simply run the following command. To use the quick installer, you must have root or sudo privileges, and curl must be installed.

bash -c "$(curl -L"

Manual Installation

Specify R version

Define the version of R that you want to install. Available versions of R can be found here:


Download and install R

Ubuntu/Debian Linux

Download the deb package:

# Ubuntu 18.04

# Ubuntu 20.04

# Ubuntu 22.04

# Debian 9

# Debian 10

# Debian 11

Then install the package:

sudo apt-get install gdebi-core
sudo gdebi r-${R_VERSION}_1_amd64.deb

RHEL/CentOS Linux

Enable the Extra Packages for Enterprise Linux repository (RHEL/CentOS 7 only):

# CentOS / RHEL 7
sudo yum install

Note that on RHEL 7, you may also need to enable the Optional repository:

# For RHEL 7 users with certificate subscriptions:
sudo subscription-manager repos --enable "rhel-*-optional-rpms"

# Or alternatively, using yum:
sudo yum install yum-utils
sudo yum-config-manager --enable "rhel-*-optional-rpms"

Download the rpm package:

# CentOS / RHEL 7

# RHEL 8

Then install the package:

sudo yum install R-${R_VERSION}-1-1.x86_64.rpm

SUSE Linux

Enable the Python backports repository (SLES 12 only):

# SLES 12
VERSION="SLE_$(grep "^VERSION=" /etc/os-release | sed -e 's/VERSION=//' -e 's/"//g' -e 's/-/_/')"
sudo zypper --gpg-auto-import-keys addrepo$VERSION/devel:languages:python:backports.repo

Download the rpm package:

# openSUSE 42.3 / SLES 12

# openSUSE 15.3 / SLES 15 SP3

Then install the package:

sudo zypper --no-gpg-checks install R-${R_VERSION}-1-1.x86_64.rpm

Verify R installation

Test that R was successfully installed by running:

/opt/R/${R_VERSION}/bin/R --version

Add R to the system path

To ensure that R is available on the system path, create symbolic links to the version of R that you installed:

sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R 
sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript

Optional post-installation steps

You may want to install additional system dependencies for R packages. We recommend installing a TeX distribution (such as TinyTeX or TeX Live) and Pandoc. For more information on system dependencies, see system requirements for R packages.

If you want to install multiple versions of R on the same system, you can repeat these steps to install a different version of R alongside existing versions.

Developer Documentation

This repository orchestrates builds using a variety of tools. The instructions below outline the components in the stack and describe how to add a new platform or inspect an existing platform.

Adding a new platform.


Create a builder/Dockerfile.platform-version (where platform-version is ubuntu-2204 or centos-7, etc.) This file must contain four major tasks:

  1. an OS_IDENTIFIER env with the platform-version.
  2. a step which ensures the R source build dependencies are installed
  3. The awscli, 1.17.10+ if installed via pip, for uploading tarballs to S3
  4. COPY and ENTRYPOINT for the file in builder/.


A new service in the docker-compose file named according to the platform-version and containing the proper entries:

command: ./
  - R_VERSION=${R_VERSION} # for testing out R builds locally
  - LOCAL_STORE=/tmp/output # ensures that output tarballs are persisted locally
  context: .
  dockerfile: Dockerfile.debian-9
image: r-builds:debian-9
  - ./integration/tmp:/tmp/output  # path to output tarballs

Job definition

IN serverless-resources.yml you'll need to add a job definition that points to the ECR image.

  Type: AWS::Batch::JobDefinition
    Type: container
        - ./
      Vcpus: 4
      Memory: 4096
        "Fn::GetAtt": [ rBuildsEcsTaskIamRole, Arn ]
      Image: #{AWS::AccountId}.dkr.ecr.#{AWS::Region}

Environment variables in the serverless.yml functions.

The serverless functions which trigger R builds need to be informed of new platforms.

  1. Add a JOB_DEFINITION_ARN_PlatformVersion env variable with a ref to the Job definition above.
  2. Append the platform-version to SUPPORTED_PLATFORMS.
  # snip
    Ref: rBuildsBatchJobDefinitionDebian9
  SUPPORTED_PLATFORMS: ubuntu-1804,debian-9,debian-10,centos-7,centos-8,opensuse-42


In order for the makefile to push these new platforms to ECR, add them to the PLATFORMS variable near the top of the Makefile

Submit a Pull Request

Once you've followed the steps above, submit a pull request. On successful merge, builds for this platform will begin to be available from the CDN.

"Break Glass"

Periodically, someone with access to these resources may need to re-trigger every R version/platform combination. This quite easy with the serverless tool installed.

# Rebuild all R versions
serverless invoke stepf -n rBuilds -d '{"force": true}'

# Rebuild specific R versions
serverless invoke stepf -n rBuilds -d '{"force": true, "versions": ["3.6.3", "4.0.2"]}'


To test the R builds locally, you can build the images:

# Build images for all platforms
make docker-build

# Or build the image for a single platform
(cd builder && docker-compose build ubuntu-2004)

Then run the build script:

# Build R for all platforms
R_VERSION=4.0.5 make docker-build-r

# Build R for a single platform
(cd builder && R_VERSION=4.0.5 docker-compose up ubuntu-2004)

# Alternatively, run the build script from within a container
docker run -it --rm --entrypoint "/bin/bash" r-builds:ubuntu-2004

# Build R 4.0.5
R_VERSION=4.0.5 ./

# Build R devel
R_VERSION=devel ./

# Build a prerelease version of R (e.g., alpha or beta)


an opinionated environment for compiling R







No releases published


No packages published