This vignette is for R users who
are new to GNU/Linux. It explains the concepts that make
sysreqr’s recommendations easier to act on. If you already
use apt or dnf daily, you can skip to other
vignettes.
A Linux distribution (or distro) bundles the Linux kernel with a set of user-space tools, a package manager, default configurations, and a release schedule. The distribution is what you actually install on a server or workstation.
R cares about distributions because:
The distributions sysreqr understands well:
jammy (22.04),
noble (24.04), resolute (26.04).bookworm (12), trixie (13).A package manager installs, updates, and removes system software from a trusted repository.
| Distribution | Package manager | Lower-level tool |
|---|---|---|
| Debian / Ubuntu | apt |
dpkg |
| Fedora / RHEL 8+ / Rocky | dnf |
rpm |
| CentOS 7 / older RHEL | yum |
rpm |
| openSUSE / SLE | zypper |
rpm |
| Alpine | apk |
(none) |
| macOS (Homebrew) | brew |
(none) |
sysreqr outputs commands that match the platform’s
package manager.
| Operation | apt | dnf / yum | zypper | apk |
|---|---|---|---|---|
| Refresh package lists | sudo apt-get update |
(automatic) | sudo zypper refresh |
sudo apk update |
| Install package(s) | sudo apt-get install -y X |
sudo dnf install -y X |
sudo zypper --non-interactive install X |
sudo apk add X |
| Search | apt-cache search X |
dnf search X |
zypper search X |
apk search X |
| Show info | apt-cache show X |
dnf info X |
zypper info X |
apk info X |
| List installed | dpkg -l |
rpm -qa |
rpm -qa |
apk list -I |
| Remove | sudo apt-get remove X |
sudo dnf remove X |
sudo zypper remove X |
sudo apk del X |
sudo and rootMost distributions ship with a root (administrator) account
that owns system files. Regular users cannot install system packages
directly. The sudo command runs one command as root, after
asking for the user’s password.
You will see sudo in every install command
sysreqr generates that touches system state. Two important
consequences:
sudo, you cannot install system packages yourself. Use
admin_request() to draft a message to your administrator
instead.sudo does not make
R CMD install itself need root. Library paths inside the
user’s home directory should not be installed as root.-dev and -devel storyR packages that compile from source need development
headers, the .h files that describe a library’s
interface. On Debian and Ubuntu, the header package has the
-dev suffix; on Fedora-style systems,
-devel.
For libxml2:
| Need | Debian/Ubuntu (apt) |
Fedora/RHEL (dnf) |
|---|---|---|
| Run programs linked to libxml2 | libxml2 |
libxml2 |
| Compile against libxml2 | libxml2-dev |
libxml2-devel |
sysreqr will pick the right name for the platform.
Sometimes a CRAN package needs both a runtime library and a separate
tool (like pkg-config); the plan reports each one.
pkg-configWhen an R package is built from source, the build script asks
pkg-config where to find the system library.
pkg-config reads small .pc files that each
-dev / -devel package installs.
A typical sign of a missing -dev package is an R build
error like:
Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc'
to the PKG_CONFIG_PATH environment variable.
sysreqr::diagnose_log() will translate this back to the
missing system package.
CRAN serves source tarballs. When R installs
xml2 from source, it may:
Compiling from source is where most “missing system library” failures come from. Two strategies to avoid them:
sysreqr::use_ppm()
produces the .Rprofile lines for that.sysreqr::setup_advice() and
sysreqr::check_packages() will list them.sysreqr fits insysreqr does not run sudo, does
not edit operating system files, and does not install
anything. It:
You stay in control.
apt-get update. On
Debian-derived systems, the package list is cached. After a fresh
container start, or after the cache expires,
apt-get install will fail until you refresh.rocker/r-ver use --no-install-recommends to
keep the image small. The Dockerfile snippet emitted by
sysreqr::dockerfile() follows the same pattern.pkg-config not installed. Many R
packages assume it is present. setup_advice() adds it to
the build-tools step.rocker/r-ver:4.4, the container is Debian-based, even if
your laptop runs Fedora. Always specify the platform
argument to sysreqr functions when working inside a
container.noble for Ubuntu 24.04..deb
packages..rpm
packages.-dev / -devel: package
suffix for development headers.pkg-config: a helper used during
builds to locate system libraries.sudo: command that runs one command as
root.vignette("preflight-setup") for the standard preflight
workflow.vignette("docker-and-ci") for container and CI
workflows.vignette("faq") for frequently asked questions.