Skip to content

sysreqs_check_installed() checks if the system requirements of all packages (or a subset of packages) are installed.

sysreqs_fix_installed() installs the missing system packages.


sysreqs_check_installed(packages = NULL, library = .libPaths()[1])
sysreqs_fix_installed(packages = NULL, library = .libPaths()[1])



If not NULL, then only these packages are checked. If a package in packages is not installed, then pak throws a warning.


Library or libraries to check.


Data frame with a custom print and format method, and a pkg_sysreqs_check_result class. Its columns are:

  • system_package: string, name of the required system package.

  • installed: logical, whether the system package is correctly installed.

  • packages: list column of character vectors. The names of the installed R packages that need this system package.

  • pre_install: list column of character vectors. Commands to run before the installation of the the system package.

  • post_install: list column of character vectors. Commands to run after the installation of the system package.

The data frame also have two attributes with additional data:

  • sysreqs_records: the raw system requirements records, and

  • system_packages: the list of the installed system packages.

sysreqs_fix_packages() returns the same value, but invisibly.


These functions use the sysreqs_platform configuration option, see Configuration . Set this if pak does not detect your platform correctly.


# This only works on supported platforms
#> system package       installed required by                   
#> --------------       --        -----------                   
#> git                           gitcreds                      
#> gsfonts                       magick                        
#> imagemagick                   magick                        
#> libcurl4-openssl-dev          curl                          
#> libfontconfig1-dev            systemfonts                   
#> libfreetype6-dev              ragg, systemfonts, textshaping
#> libfribidi-dev                textshaping                   
#> libharfbuzz-dev               textshaping                   
#> libicu-dev                    stringi                       
#> libjpeg-dev                   ragg                          
#> libmagick++-dev               magick                        
#> libnode-dev                   V8                            
#> libpng-dev                    ragg                          
#> libssl-dev                    curl, openssl                 
#> libtiff-dev                   ragg                          
#> libxml2-dev                   xml2                          
#> make                          fs, sass                      
#> pandoc                        knitr, pkgdown, rmarkdown