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.
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.
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(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.
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).
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..
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.
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!