Announcement: Introducing manylinux portable R binary packages

Today, Posit is excited to announce a preview of our latest R package initiative we're calling Portable R Binary Packages. These new binary packages leverage the same manylinux principles previously developed for the Python package ecosystem, to provide R packages that include required system libraries, reducing the need to install Linux system dependencies manually.

Read more on the Posit Blog here: Introducing Portable Linux R Binary Packages - Posit

Builds of these packages for the majority of CRAN are now available from Posit Public Package Manager as the new manylinux_2_28 distribution. We encourage the R community to try these out and use this thread to share any feedback or issues you encounter.

3 Likes

Found some issues on Ubuntu 24.04. Partly maybe this is expected because features are unsupported due to the very old system libraries from RHEL-8, but some other things that I think should work:

Libraries dynamically loading modules

ImageMagick dynamically loads its formatting driver libs.

library(magick)
example(image_read)
# Error in eval(ei, envir) :
#   R: NoDecodeDelegateForThisImageFormat `PNG' @ error/constitute.c/ReadImage/581

Problems finding SSL certs

library(mongolite)
example(mongo)
# mongo> # Connect to demo server
# mongo> con <- mongo("mtcars", url =
# mongo+   "mongodb+srv://readwrite:test@cluster0-84vdt.mongodb.net/test")
# Error: No suitable servers found (`serverSelectionTryOnce` set): [TLS handshake failed: certificate verify failed # (20): unable to get local issuer certificate calling hello on 'cluster0-shard-00-01-84vdt.mongodb.net:27017'] [TLS handshake failed: certificate verify failed (20): unable to get local issuer certificate calling hello on 'cluster0-shard-00-02-84vdt.mongodb.net:27017'] [TLS handshake failed: certificate verify failed (20): unable to get local issuer certificate calling hello on 'cluster0-shard-
library(arrow)
s3_bucket("voltrondata-labs-datasets")
# Error: IOError: When resolving region for bucket 'voltrondata-labs-datasets': AWS Error NETWORK_CONNECTION during HeadBucket operation: curlCode: 77, Problem with the SSL CA cert (path? access rights?)

av

> library(av)
# Error: package or namespace load failed for 'av' in dyn.load(file, DLLpath = DLLpath, ...):
# unable to load shared object '/usr/local/lib/R/site-library/av/libs/av.so':
 # libpython3.6m.so.1.0: cannot open shared object file: No such file or directory

Packages looking for share/conf files

Some functions in OpenCV require config files that are under /etc or /share on the host

library(opencv)
example(ocv_face)
# ocv_mr> # Find face
# ocv_mr> faces <- ocv_face(mona)
# Error in find_data_dir() : Failed to find opencv 'share' directory

Python stuff

library(reticulate)
py_config()
# sh: 1: /root/.cache/R/reticulate/uv/bin/uv: not found
# Error in system2(uv, c("python list", "--all-versions", "--color never",  :
#  error in running command: 'Function not implemented'
# Error: Installation of Python not found, Python bindings not loaded.
3 Likes

Amazon Linux 2023 errors

Thanks for this cool initiative. I was particularly excited by the statement:

Portable binary packages should be compatible with more Linux distributions than we currently support, such as Amazon Linux 2023.

(I'm stuck on AL2023 at work and there are a lot of shortcomings here w.r.t. setting up a workable R environment.)

While I am happy to report that some 'difficult' libraries (e.g., arrow, igraph) seem to be installing and running fine on AL2023, I was surprised to encounter errors for other standard libraries. For example, I was not able to install the tidyverse on my first attempt.

tidyverse

tic = Sys.time(); install.packages('tidyverse'); (toc = Sys.time() - tic)
…
ERROR: dependencies ‘ragg’, ‘rvest’, ‘xml2’ are not available for package ‘tidyverse’
Perhaps try a variation of:
install.packages(c('ragg', 'rvest', 'xml2'))
* removing ‘/opt/R/4.5.0-glibc/lib/R/library/tidyverse’

The downloaded source packages are in
        ‘/tmp/RtmpcKn1bc/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("tidyverse") :
  installation of package ‘xml2’ had non-zero exit status
2: In install.packages("tidyverse") :
  installation of package ‘systemfonts’ had non-zero exit status
3: In install.packages("tidyverse") :
  installation of package ‘textshaping’ had non-zero exit status
4: In install.packages("tidyverse") :
  installation of package ‘ragg’ had non-zero exit status
5: In install.packages("tidyverse") :
  installation of package ‘rvest’ had non-zero exit status
6: In install.packages("tidyverse") :
  installation of package ‘tidyverse’ had non-zero exit status
Time difference of 18.4831 mins

I'm not sure what's happening here, but manually installing the various sysdeps through the package manager fixes the problem (albeit being in contradiction to the promise of manylinux).

sudo dnf install -y fontconfig-devel libxml2-devel fribidi-devel
# multiple sysdeps for ragg
sudo dnf install -y freetype-devel libpng-devel libtiff-devel libjpeg-devel

other (unigd and spatial packages)

Similarly, I encountered a 'cairo-devel' error for the unigq R package. And I could not install any of regular spatial package like sf or terra.

SessionInfo etc.

> sessionInfo()

R version 4.5.0 (2025-04-11)
Platform: aarch64-unknown-linux-gnu
Running under: Amazon Linux 2023.7.20250527

Matrix products: default
BLAS:   /opt/R/4.5.0-glibc/lib/R/bin/exec/R 
LAPACK: /opt/R/4.5.0-glibc/lib/R/modules/lapack.so;  LAPACK version 3.7.1

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

time zone: UTC
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] igraph_2.1.4

loaded via a namespace (and not attached):
[1] compiler_4.5.0  magrittr_2.0.3  cli_3.6.5       tools_4.5.0    
[5] lifecycle_1.0.4 pkgconfig_2.0.3 rlang_1.1.6 
> getOption('repos')
                                                  CRAN 
"https://p3m.dev/cran/__linux__/manylinux_2_28/latest" 
1 Like

Hey @grantmcd, just looking at this line in the session info, are you on an arm64 system? If so, then we currently don't support Linux binary packages at all for arm64, so you're probably getting source and having to compile everything from scratch.

However, Linux arm64 support is next up on our binary support roadmap because of the increasing Apple SIlicon and Graviton/etc. type use. manylinux_2_28 will be included in the initial Linux arm64 rollout, so just wait a little longer.. :slight_smile:

1 Like

Also, we already talked a little internally, but just want to thank @jeroen here as well for the reports. We have all these issues tracked now and will start looking into them.

Some of them are portability issues, so they may actually work fine if you're on a Red Hat or AL2023 system, but fail on Ubuntu.

Ah, thanks @greg that explains it.

Ya, a lot of our internal systems have already pivoted to arm64 so it would be great to get coverage there too. Thanks again and looking forward to the upcoming rollout!