| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/sysreqs.R |
| 3 |
\name{sysreqs} |
| 4 |
\alias{sysreqs} |
| 5 |
\title{R System Requirements} |
| 6 |
\usage{ |
| 7 |
sysreqs( |
| 8 |
packages = NULL, |
| 9 |
..., |
| 10 |
local = FALSE, |
| 11 |
check = NULL, |
| 12 |
report = TRUE, |
| 13 |
distro = NULL, |
| 14 |
collapse = FALSE, |
| 15 |
project = NULL |
| 16 |
) |
| 17 |
} |
| 18 |
\arguments{ |
| 19 |
\item{packages}{A vector of \R package names. When \code{NULL} |
| 20 |
(the default), the project's package dependencies as reported via |
| 21 |
\code{\link[=dependencies]{dependencies()}} are used.} |
| 22 |
|
| 23 |
\item{...}{Unused arguments, reserved for future expansion. If any arguments |
| 24 |
are matched to \code{...}, renv will signal an error.} |
| 25 |
|
| 26 |
\item{local}{Boolean; should \code{renv} rely on locally-installed copies of |
| 27 |
packages when resolving system requirements? When \code{FALSE}, \code{renv} will |
| 28 |
use \url{https://crandb.r-pkg.org} to resolve the system requirements |
| 29 |
for these packages.} |
| 30 |
|
| 31 |
\item{check}{Boolean; should \code{renv} also check whether the requires system |
| 32 |
packages appear to be installed on the current system? Ignored when |
| 33 |
\code{distro} is supplied.} |
| 34 |
|
| 35 |
\item{report}{Boolean; should \code{renv} also report the commands which could be |
| 36 |
used to install all of the requisite package dependencies?} |
| 37 |
|
| 38 |
\item{distro}{The name of the Linux distribution for which system requirements |
| 39 |
should be checked -- typical values are "ubuntu", "debian", and "redhat". |
| 40 |
These should match the distribution names used by the R system requirements |
| 41 |
database. A version suffix can be included; for example, "ubuntu:24.04".} |
| 42 |
|
| 43 |
\item{collapse}{Boolean; when reporting which packages need to be installed, |
| 44 |
should the report be collapsed into a single installation command? When |
| 45 |
\code{FALSE} (the default), a separate installation line is printed for each |
| 46 |
required system package.} |
| 47 |
|
| 48 |
\item{project}{The project directory. If \code{NULL}, then the active project will |
| 49 |
be used. If no project is currently active, then the current working |
| 50 |
directory is used instead.} |
| 51 |
} |
| 52 |
\description{ |
| 53 |
Compute the system requirements (system libraries; operating system packages) |
| 54 |
required by a set of \R packages. |
| 55 |
} |
| 56 |
\details{ |
| 57 |
This function relies on the database of package system requirements |
| 58 |
maintained by Posit at \url{https://github.com/rstudio/r-system-requirements}, |
| 59 |
as well as the "meta-CRAN" service at \url{https://crandb.r-pkg.org}. This |
| 60 |
service primarily exists to map the (free-form) \code{SystemRequirements} field |
| 61 |
used by \R packages to the system packages made available by a particular |
| 62 |
operating system. |
| 63 |
|
| 64 |
As an example, the \code{curl} R package depends on the \code{libcurl} system library, |
| 65 |
and declares this with a \code{SystemRequirements} field of the form: |
| 66 |
\itemize{ |
| 67 |
\item libcurl (>= 7.62): libcurl-devel (rpm) or libcurl4-openssl-dev (deb) |
| 68 |
} |
| 69 |
|
| 70 |
This dependency can be satisfied with the following command line invocations |
| 71 |
on different systems: |
| 72 |
\itemize{ |
| 73 |
\item Debian: \verb{sudo apt install libcurl4-openssl-dev} |
| 74 |
\item Redhat: \verb{sudo dnf install libcurl-devel} |
| 75 |
} |
| 76 |
|
| 77 |
and so \code{sysreqs("curl")} would help provide the name of the package |
| 78 |
whose installation would satisfy the \code{libcurl} dependency. |
| 79 |
} |
| 80 |
\examples{ |
| 81 |
|
| 82 |
\dontrun{ |
| 83 |
|
| 84 |
# report the required system packages for this system |
| 85 |
sysreqs() |
| 86 |
|
| 87 |
# report the required system packages for a specific OS |
| 88 |
sysreqs(platform = "ubuntu") |
| 89 |
|
| 90 |
} |
| 91 |
|
| 92 |
} |