{"id":21743280,"url":"https://github.com/cran4linux/rspm","last_synced_at":"2025-10-22T04:01:47.386Z","repository":{"id":49768324,"uuid":"517857050","full_name":"cran4linux/rspm","owner":"cran4linux","description":"RStudio Package Manager","archived":false,"fork":false,"pushed_at":"2024-10-29T11:41:20.000Z","size":8440,"stargazers_count":46,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-29T21:16:44.514Z","etag":null,"topics":["automation","centos","packages","r","rhel","ubuntu"],"latest_commit_sha":null,"homepage":"https://cran4linux.github.io/rspm","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cran4linux.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Enchufa2"}},"created_at":"2022-07-26T00:08:09.000Z","updated_at":"2025-06-21T18:22:39.000Z","dependencies_parsed_at":"2024-07-11T19:40:32.967Z","dependency_job_id":"de3ac46a-b67e-4872-b7ed-ecc1407814b9","html_url":"https://github.com/cran4linux/rspm","commit_stats":null,"previous_names":["cran4linux/rspm","enchufa2/rspm"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/cran4linux/rspm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cran4linux%2Frspm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cran4linux%2Frspm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cran4linux%2Frspm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cran4linux%2Frspm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cran4linux","download_url":"https://codeload.github.com/cran4linux/rspm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cran4linux%2Frspm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265853183,"owners_count":23839124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","centos","packages","r","rhel","ubuntu"],"created_at":"2024-11-26T07:04:01.640Z","updated_at":"2025-10-22T04:01:47.303Z","avatar_url":"https://github.com/cran4linux.png","language":"R","funding_links":["https://github.com/sponsors/Enchufa2"],"categories":["R"],"sub_categories":[],"readme":"# rspm: RStudio Package Manager\n\n\u003c!-- badges: start --\u003e\n[![Build Status](https://github.com/cran4linux/rspm/workflows/build/badge.svg)](https://github.com/cran4linux/rspm/actions)\n[![CRAN\\_Status\\_Badge](https://www.r-pkg.org/badges/version/rspm)](https://cran.r-project.org/package=rspm)\n[![Downloads](https://cranlogs.r-pkg.org/badges/rspm)](https://cran.r-project.org/package=rspm)\n\u003c!-- badges: end --\u003e\n\n## Key features\n\n- Connects to [RStudio Public Package Manager](https://packagemanager.posit.co/)\n  to provide **fast binary installations** of R packages on Linux.\n- **Complete coverage** of CRAN and BioConductor packages. \n- **Full integration** with the system package manager to resolve, download and\n  configure system requirements automagically without leaving your R console.\n- **Fully user mode**, no root privileges required.\n- Support for **CentOS / RHEL** 8-10.\n- Support for **RHEL derivatives**:\n  Rocky Linux, AlmaLinux, Oracle Linux, Amazon Linux 2-2023.\n- Support for **openSUSE / SLES** 15.6.\n- Support for **Debian** 12 (requires `apt-file`).\n- Support for **Ubuntu** 22.04 and 24.04 (requires `apt-file`).\n\nBoth R packages and system dependencies **are installed into the user home**.\nFor lightning-fast system-based installations (which have other advantages,\nsuch as multitenancy, reversibility and automatic updates, still without root\nprivileges), see the [bspm](https://cran4linux.github.io/bspm/) package and\nprojects such as [cran2copr](https://github.com/cran4linux/cran2copr) for Fedora\nor [r2u](https://github.com/eddelbuettel/r2u) for Ubuntu.\n\n## Demo\n\nHere we enable `rspm` and trigger a binary installation of the `units` package.\nThen, we can see how the UDUNITS-2 dependency is detected, downloaded and\nconfigured.\n\n![](https://github.com/cran4linux/rspm/blob/main/docs/assets/rspm_units.gif?raw=true)\n\n## Installation and usage\n\nYou can install it directly from GitHub using the `remotes` package:\n\n```r\nremotes::install_github(\"cran4linux/rspm\")\n```\n\n### Basic usage\n\nYou just need to enable it once for your session, and then you can install or\nupdate packages normally via `install.packages` or `update.packages`.\n\n```r\nrspm::enable()\ninstall.packages(\"units\")\n```\n\nPackages with system requirements, like the one above, will be scanned and\nconfigured automatically. Typically, everything will just work without any\nfurther action. But if something gets misconfigured for some reason, it is\npossible to manually trigger a reconfiguration with the following command:\n\n```r\nrspm::install_sysreqs()\n```\n\nTo enable it by default for all sessions, put the following into your `.Rprofile`:\n\n```r\nrspm::enable() # wrap it in suppressMessages() to suppress the initial message\n```\n\n### {renv} projects\n\nTo initialize an `renv` project with `rspm` support, just run the following:\n\n```r\nrspm::renv_init()\n```\n\nThis command runs `renv::init()` for you and then installs the infrastructure\nrequired for the integration with `install.packages` and `update.packages`.\nNote that, if `renv::install` or `renv::update` are called directly, then\n`rspm::install_sysreqs()` needs to be called manually.\n\n### Docker workflows\n\nIn Docker containers, system requirements can be installed directly as root.\nTherefore, it is enough to include in your Dockerfile the following line\nright after `renv::restore()`:\n\n```Dockerfile\nRUN Rscript -e 'renv::install(\"rspm\"); rspm::install_sysreqs()'\n```\n\n## Technical details\n\nSince _always_, Linux R users have been struggling with source installations and\nmanual management of build dependencies. Several projects over the years tried\nto lessen this pain by building repositories of binaries that complement and\nscale up the offer by various distributions. See e.g. the\n[c2d4u.team/c2d4u4.0+](https://launchpad.net/~c2d4u.team/+archive/ubuntu/c2d4u4.0+)\nPPA repo for Ubuntu or, more recently, the\n[autoCRAN](https://build.opensuse.org/project/show/devel:languages:R:autoCRAN)\nOBS repo for OpenSUSE, the \n[iucar/cran](https://copr.fedorainfracloud.org/coprs/iucar/cran/) Copr repo for\nFedora, the [ArchRPkgs](https://github.com/dvdesolve/ArchRPkgs) repo for Arch\nand the [r2u](https://github.com/eddelbuettel/r2u) repo again for Ubuntu.\nThese are tightly integrated and can be fully managed without leaving the R\nconsole thanks to the [bspm](https://cran4linux.github.io/bspm/) package.\nSee [this paper](https://arxiv.org/abs/2103.08069) for a detailed review.\n\nOn the other hand, RStudio recently took a complementary approach by building\nbinaries---for various distributions, R versions and architectures---and serving\nthem via their own CRAN mirror, also called the\n[RStudio Public Package Manager (RSPM)](https://packagemanager.posit.co/).\nIn contrast to the previous solutions, this method allows the user to install\nbinary packages as _user packages_ under their home directory (virtually\nanywhere), instead of as _system packages_. The main issue is that the user has\nstill to manage run-time system requirements themselves (i.e., shared libraries\nrequired by some packages to work), so this method by itself produces\ninstallations that are fundamentally broken.\n\nTo fill this gap, this package not only provides an easy setup of RSPM, but also\nmonitors and scans every installation for missing system requirements, and then\nautomatically downloads, installs and configures them, relieving the user of\nthis task. This is done following the same complementary philosophy:\n**everything is installed as _user packages_ under the home directory**. More\nspecifically, this package uses the path `~/.local/share/R/rspm` for this.\n\nThe main technical issue here is that libraries are search for only in a few\npre-configured places that belong to the system (such as `/usr/lib`), and thus\nwe need a mechanism to feed our new user-hosted library paths to R packages,\nhopefully without restarting R and managing environment variables. This is\nachieved by **automatically updating the `RPATH`** of every `.so` binary in our\nuser R packages. This `RPATH` is an optional entry that lives in the header\nof ELF executables and shared libraries, and it is used by the dynamic linker\nas the primary search path if exists. Therefore, it is the perfect mechanism\nfor this task, because it can be applied dynamically as new installations are\nmade, and without requiring any special privilege.\n\n## Support\n\nIf you find any bug or you'd like to request support for other distributions\n(importantly, they must be supported by RStudio), please file issues at our\n[GitHub issue tracker](https://github.com/cran4linux/rspm/issues).\nNote though that some quirks may be expected:\n\n- _Some library is not found_. This means that the library version in your\n  system is different from what RStudio had when the package was built. This is\n  more likely to happen in derivatives (e.g. Amazon Linux) that drift away from\n  their parent.\n- _Some package is installed from source_. This means that RStudio has no\n  binary version for that package.\n\nThere is nothing _we_ can do from `rspm` in either case, so please **do not**\nfile issues about them. Unfortunately, the best _you_ can do is to install the\ndevelopment packages for the required library and force a source installation\n(i.e. _business as usual_).\n\n## Disclaimer\n\n_RStudio_ is a registered trademark of [Posit](https://posit.co/).\nThis software provides access to a public repository maintained by RStudio and\nprovided to the open-source community for free, but has no association with it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcran4linux%2Frspm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcran4linux%2Frspm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcran4linux%2Frspm/lists"}