Linux Binary Packages¶
Installing R packages from source on Linux is slow and fails whenever a system library or compiler is missing. Package Manager serves precompiled binaries instead.
| Install type | Typical time for sf or terra |
Needs compilers and -devel libraries |
|---|---|---|
| Source | 5 to 15 minutes | Yes |
| Binary | Seconds | No (runtime libraries only) |
How binaries reach your server¶
Posit builds CRAN (and Bioconductor) binaries centrally, as part of each daily snapshot, and publishes them through the Posit Package Service. Your Package Manager downloads them on demand, the same way it downloads source tarballs.1
Package Manager does not build CRAN binaries
Your server never compiles CRAN packages, so there is no build queue and nothing to "trigger". If binaries are not being served, check four things:
- The distribution is enabled.
- The client URL is right.
- The R user agent is right.
- The package has a binary for that platform.
You can only add your own binaries to local and Git sources.
Supported binary distributions (as of 2026.11):1
| Distribution | Name in URLs | Architectures |
|---|---|---|
| RHEL 8 (and compatible) | centos8 |
x86_64 |
| RHEL 9 (and compatible) | rhel9 |
x86_64, ARM64 |
| RHEL 10 (and compatible) | rhel10 |
x86_64, ARM64 |
| Ubuntu 22.04 / 24.04 / 26.04 | jammy / noble / resolute |
x86_64 (ARM64 on 24.04+) |
| Debian 13 | trixie |
x86_64 |
| SLES 15 SP7 | Check with rspm list distributions |
x86_64 |
| Portable (glibc 2.28+) | manylinux_2_28 |
x86_64, ARM64 |
| Windows, macOS | windows, macos |
Binaries exist for the current R release and the four previous minor versions. Each is built against the oldest compatible patch release of its minor version, so it works with any patch release in that series.1 Run rspm list distributions for the authoritative list on your server.
Portable binaries (manylinux_2_28) bundle their system libraries. They install on most glibc distributions without a dnf install of runtime libraries, which is convenient on locked down hosts. However, they do not receive security updates when the OS patches those libraries. Only reinstalling the R package picks up the fix.1
Server configuration¶
Binaries for all distributions are enabled by default.2 To limit them:
Restart and confirm:
Repository URL formats¶
| Format | Example | Use when |
|---|---|---|
__linux__/<distro> |
https://packagemanager.example.com/cran/__linux__/rhel9/latest |
Hosts with several R versions (Workbench, Connect); relies on the R user agent |
bin/linux/<distro>-<arch>/<R> |
https://packagemanager.example.com/cran/latest/bin/linux/rhel9-x86_64/4.5 |
Single R version, or clients that cannot set a user agent |
| Source | https://packagemanager.example.com/cran/latest |
Explicit source installs |
Replace latest with a snapshot date (for example 2026-06-15) to freeze the repository. See Change Control.
The R user agent¶
With __linux__ URLs, Package Manager decides which binary to send based on the R version and platform in the HTTP User-Agent. Since R 3.6, R's default libcurl user agent no longer includes the platform, so Package Manager can't tell which binary to serve on Linux. Windows and macOS don't need it, because R has only one binary format on each.1 Add this to every R installation's Rprofile.site:
options(HTTPUserAgent = sprintf(
"R/%s R (%s)",
getRversion(),
paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"])
))
Test what Package Manager returns for a given user agent:
curl -s -o /dev/null -w '%{http_code} %{content_type}\n' -H "User-Agent: R (4.5.2 x86_64-pc-linux-gnu x86_64 linux-gnu)" https://packagemanager.example.com/cran/__linux__/rhel9/latest/src/contrib/dplyr_1.1.4.tar.gz
Workbench¶
/etc/rstudio/repos.conf only affects RStudio Pro sessions.3 Set repositories for every R process (Positron, VS Code, Jupyter, terminal Rscript, Workbench Jobs) in each R installation's site profile, /opt/R/<version>/lib/R/etc/Rprofile.site:
local({
options(repos = c(
CRAN = "https://packagemanager.example.com/cran/__linux__/rhel9/latest",
Internal = "https://packagemanager.example.com/internal/__linux__/rhel9/latest"
))
})
options(HTTPUserAgent = sprintf(
"R/%s R (%s)",
getRversion(),
paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"])
))
Apply it to all installed versions at once:
For Python, set the index in /etc/pip.conf:
[global]
index-url = https://packagemanager.example.com/pypi/latest/simple
trusted-host = packagemanager.example.com
Users must start a new R session to pick up changes.
Connect¶
Point Connect at the source URL and let Connect choose the binary path:
[RPackageRepository "CRAN"]
URL = "https://packagemanager.example.com/cran/latest"
[RPackageRepository "Internal"]
URL = "https://packagemanager.example.com/internal/latest"
[R]
PositPackageManagerURLRewriting = "force-binary"
R.PositPackageManagerURLRewriting values:4
| Value | Behavior |
|---|---|
auto (default) |
Rewrites incompatible binary URLs (for example centos8 on a RHEL 9 host) to compatible binaries; leaves source URLs alone |
force-binary |
Rewrites all Package Manager URLs to binary packages for the host distribution; portable binary URLs are left as they are |
force-portable |
Rewrites to portable manylinux binaries |
force-source |
Always source |
none |
Uses URLs exactly as written |
The rewriting applies both to configured RPackageRepository URLs and to repository URLs recorded in published content.4 That is why a deployment log shows a different URL than the one you put in the config. This is working as intended, and it is what you want after an OS migration. Content published against __linux__/centos8 keeps working on a RHEL 9 Connect, because force-binary rewrites the URL for you. So does the auto default, when the distributions are compatible.
Verifying binaries are served¶
From R on the client host:
Look for * installing *binary* package 'dplyr'. If you see *source*, check the URL, the user agent, and whether a binary exists for that platform in the Package Manager web UI.
In Connect deployment logs, binary installs finish in seconds. A source build logs compiler output and takes minutes:
Installing s2 (1.1.9) ...
curl: HTTP 200 https://packagemanager.example.com/cran/latest/src/contrib/s2_1.1.9.tar.gz
OK (built source)
From the shell, confirm a binary repository answers:
A 400 from curl -I on the bare repository root is normal; Package Manager expects a file path.
Library permission errors while testing¶
Testing installs as a service account often fails for reasons unrelated to binaries:
| Error | Cause | Fix |
|---|---|---|
'lib = "/opt/R/4.5.2/lib/R/library"' is not writable |
The account cannot write the system library (correct) | Install to a writable library with lib =, or test as a normal user |
cannot open compressed file '.RData' |
R started in a directory with an unreadable .RData |
cd to your home directory, or use R --vanilla |
unable to load shared object ... undefined symbol |
Package compiled against a different library version than is installed (common with magick, sf) |
Use the binary for the host distro, install matching runtime libraries |
For a Connect test, install into a throwaway library rather than the system library:
sudo -u rstudio-connect /opt/R/4.5.2/bin/R --vanilla -q -e 'dir.create(lib <- tempfile()); install.packages("sf", lib = lib, repos = "https://packagemanager.example.com/cran/__linux__/rhel9/latest")'
System dependencies¶
Binaries still need runtime libraries (for example gdal, proj, geos for sf). Package Manager shows required system packages on each package's page and in the repository Setup page. For a whole project, the pak package can list them: