
sysreqr helps R users on GNU/Linux find the system
packages they need before, or after, an R package installation fails. It
runs offline by default, generates portable shell, Docker, and CI
commands, and never edits operating system state itself; the user stays
in control.
It can:
sudo.sysreqr has zero runtime dependencies.
The Suggests field lists only testthat,
knitr, rmarkdown, and withr,
which are used for tests and vignette building; none of them are loaded
when a user calls package functions.
After release on CRAN:
install.packages("sysreqr")Development version:
# install.packages("pak")
pak::pak("choxos/sysreqR")pak is used here only as an installer. It is
not a dependency of sysreqr.
The development version does not build the vignettes by default. Read them on the package website, or build them locally with:
# install.packages("remotes")
remotes::install_github("choxos/sysreqR", build_vignettes = TRUE)library(sysreqr)
plan <- check_packages(
c("xml2", "curl"),
platform = "ubuntu-22.04"
)
plan
#> System requirement preflight
#>
#> Platform: Ubuntu 22.04
#> Package manager: apt
#> Backend: bundled
#>
#> R packages checked:
#> xml2, curl
#>
#> System packages to install:
#> libcurl4-openssl-dev needed by: curl status: unknown
#> libssl-dev needed by: curl status: unknown
#> libxml2-dev needed by: xml2 status: unknown
#>
#> Run:
#> sudo apt-get update
#> sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-devTurn the plan into install commands:
install_command(plan)
write_install_script(plan, file.path(tempdir(), "install-sysreqs.sh"))Or into a deployment snippet:
dockerfile(plan)
github_actions(plan)Or into an administrator request:
admin_request(plan)setup_advice(platform = "ubuntu-24.04")For package-specific setup advice and a reviewable shell script:
setup_advice(
packages = c("xml2", "curl"),
platform = "ubuntu-24.04",
script = file.path(tempdir(), "setup-sysreqr.sh")
)setup_advice() prints a practical four-layer checklist
(binary packages, build tools, optional R Project repositories,
package-specific requirements) and writes a shell script
only when script is supplied. It never
runs sudo, edits .Rprofile, or changes
operating system repository files.
After a failed install in the current R session:
check_error(platform = "ubuntu-22.04")From a log file:
diagnose_log("install.log", platform = "ubuntu-22.04")If the failed package names are already known:
diagnose_failed_packages(
c("xml2", "curl"),
platform = "ubuntu-22.04"
)Diagnosis returns a regular sysreqr_plan, so the result
feeds straight into install_command(),
write_install_script(), admin_request(),
dockerfile(), or github_actions().
Check a project directory (reads renv.lock, then
DESCRIPTION, then source files):
check_project(".")Check installed packages:
check_library()
check_library(c("xml2", "curl"))Build a Linux binary repository URL:
ppm_repo(platform = "ubuntu-24.04")
#> [1] "https://packagemanager.posit.co/cran/__linux__/noble/latest"Preview the .Rprofile lines that would point R at
it:
use_ppm(platform = "ubuntu-24.04", dry_run = TRUE)Query live system requirement data when network access is available:
ppm_sysreqs(
packages = c("xml2", "curl"),
platform = "ubuntu-22.04"
)The package ships five focused vignettes:
vignette("preflight-setup", package = "sysreqr")
vignette("diagnosing-failures", package = "sysreqr")
vignette("linux-fundamentals", package = "sysreqr") # for GNU/Linux newcomers
vignette("docker-and-ci", package = "sysreqr")
vignette("faq", package = "sysreqr")If you installed the development version without vignettes, read them on the package website.
sysreqr focuses on GNU/Linux. Detection and
platform-specific commands are tested for:
jammy), 24.04
(noble), 26.04 (resolute)bookworm), 13
(trixie)macOS and Windows are detected, but most package installation problems on those platforms are handled by CRAN binaries rather than system package checks.
| Tool | Strengths | Limitations |
|---|---|---|
pak::pkg_sysreqs() |
Authoritative live resolver | Requires pak; no log diagnosis |
remotes::system_requirements() |
Light; widely available | No log diagnosis, no project scanner |
renv::sysreqs() |
Project-oriented; integrates with renv workflow |
Requires renv |
sysreqr |
Zero runtime deps; log diagnosis; beginner UX | Bundled DB is small; biased toward apt |
sysreqr can use pak as one of its backends
(backend = "pak") when it is installed. The tools are
complementary, not competitors.
System requirement data can be incomplete when upstream metadata is incomplete. Binary packages avoid most source compilation problems, but they do not solve every runtime library, R version, permission, or network issue.
Log diagnosis is heuristic. It reports likely fixes, not guarantees.
Sofi-Mahmudi, A. (2026). sysreqr: Preflight Checks for R Package System Requirements. R package. https://github.com/choxos/sysreqR.
ORCID: https://orcid.org/0000-0001-6829-0823.
Portions of the package code, documentation, and tests were drafted and audited with the assistance of large language models: Anthropic’s Claude Opus 4.7 Max (via Claude Code) and OpenAI’s ChatGPT 5.5 xhigh (via Codex). All design decisions and the final review and validation were performed by the named author, who takes responsibility for the package’s contents.
GPL-3. See https://www.gnu.org/licenses/gpl-3.0 for the full license text.