Skip to content

r-hub/r-glibc

Repository files navigation

Generic Linux build of R

r-glibc is a generic build of R, that works on any (recent) GNU libc based Linux distribution.

Warning

Note that r-glibc is experimental currently.

Supported Linux systems

r-glibc should work out of the box without additional dependencies on any Linux platform that uses GNU libc 2.27 or newer. These include most systems in use today. We regularly test it on these following platforms:

  • Ubuntu Linux 18.04, 20.04, 22.04, 24.04.
  • Debian Linux 11, 12,
  • AlmaLinux 8, 9,
  • Rocky Linux 8, 9,
  • RedHat Enterprise Linux 8, 9,
  • OpenSUSE Leap 15.5, 15.6 *,
  • SUSE Linux Enterprise 15 SP5, SP6 *,
  • Fedora Linux 39, 40, 41.
* On OpenSUSE and SUSE Linux Enterprise systems R packages that use the ISO Latin 1 character encoding need the glibc-locale-base package installed. Install it with zypper install glibc-locale-base.

Architectures

We have x86_64 and aarch64 builds.

Supported R versions

  • R 3.6.0 to R 4.4.2.
  • Daily development snapshot (devel).
  • Daily snapshot of the next (patched, beta, alpha or RC) version of R (next).
  • List of all supported versions: • 3.6.03.6.13.6.23.6.34.0.04.0.14.0.24.0.34.0.44.0.54.1.04.1.14.1.24.1.34.2.04.2.14.2.24.2.34.3.04.3.14.3.24.3.34.4.04.4.14.4.2nextdevel.

Known limitations

  • No X11 support (#18).
  • bmp(), png(), tiff(), jpeg() default to type = "Xlib" so they don't work without an explicit type = "cairo" argument (#15).
  • No built-in libdeflate support (#12).
  • The built-in fontconfig library might not work with the system's fonts (#19).
  • The included system libraries are relatively old (#20).
  • r-glibc does not work on platforms that do not use GNU libc, e.g. on Alpine Linux.

Please open an issue if you think that r-glibc does not work as promised.

Installation

Watch this issue in the rig repository if you would like to install these builds with rig.

Debian or Ubuntu based platforms

Replace 4.4.2 with the R version you want to install.

R_VERSION=4.4.2
curl -LO https://github.com/r-hub/R/releases/download/v${R_VERSION}/r-${R_VERSION}-glibc_1_$(dpkg --print-architecture).deb
dpkg -i r-${R_VERSION}-glibc_1_$(dpkg --print-architecture).deb
ln -s /opt/R/${R_VERSION}-glibc/bin/R /usr/local/bin

Fedora, RHEL or other RPM based distributions

R_VERSION=4.4.2
yum install https://github.com/r-hub/R/releases/download/v${R_VERSION}/R-${R_VERSION}-glibc-1-1.$(arch).rpm
ln -s /opt/R/${R_VERSION}-glibc/bin/R /usr/local/bin

OpenSUSE

R_VERSION=4.4.2
zypper install glibc-locale-base
zypper install --allow-unsigned-rpm https://github.com/r-hub/R/releases/download/v${R_VERSION}/R-${R_VERSION}-glibc-1-1.$(arch).rpm
ln -s /opt/R/${R_VERSION}-glibc/bin/R /usr/local/bin

Other GNU libc Linux platforms

R_VERSION=4.4.2
curl -Ls https://github.com/r-hub/R/releases/download/v${R_VERSION}/r-${R_VERSION}-glibc-$(arch).tar.gz |
  tar xz -C /
ln -s /opt/R/${R_VERSION}-glibc/bin/R /usr/local/bin

R packages and system dependencies

While the r-glibc builds are dependency-free, some R packages require the installation of system packages. I suggest you use pak and it's automatic system dependency installation system to automate system package installation, if pak supports your platform.

Multiple versions

r-glibc is designed to allow installing multiple versions of R, side by side. You can set a symbolic link at /usr/local/bin/R to the version you would like to use by default. Watch this issue if you would like to have a way to automated this with rig.

License

See https://www.r-project.org/Licenses/ for the R licenses

These Dockerfiles and tools are licensed under the MIT License.

© Posit Software, PBC