System Dependencies of R Packages

Many R packages require system packages to be installed. An R package will fail to compile and install if its system dependencies are not available. We recommend installing these system requirements before your data science team begins deploying content to Posit Connect.

Different packages and commands are provided for each supported distribution. Depending on your user permissions, you might need to use sudo to run these commands.

rpm -q epel-release || dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

if ! subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms; then
  # add the codeready-builder repository
  dnf install -y dnf-plugins-core
  dnf config-manager --set-enabled "codeready-builder-for-rhel-9-*-rpms" || true
fi

dnf install -y cairo-devel openssl-devel make libcurl-devel mariadb-devel unixODBC-devel nodejs-libs java-11-openjdk-devel libxml2-devel git fontconfig-devel freetype-devel libgit2-devel zlib-devel glpk-devel libjpeg-turbo-devel ImageMagick ImageMagick-c++ cmake libpng-devel libtiff-devel python3 mesa-libGLU-devel mesa-libGL-devel gdal-devel gdal geos-devel proj-devel sqlite-devel libsodium-devel libicu-devel tcl tk tk-devel fribidi-devel harfbuzz-devel udunits2-devel
rpm -q epel-release || dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

if ! subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms; then
  # add the codeready-builder repository
  dnf install -y dnf-plugins-core
  dnf config-manager --set-enabled "codeready-builder-for-rhel-8-*-rpms" || true
fi

dnf install -y cairo-devel openssl-devel make libcurl-devel mariadb-devel unixODBC-devel java-1.8.0-openjdk-devel libxml2-devel git fontconfig-devel freetype-devel libgit2-devel zlib-devel glpk-devel libjpeg-turbo-devel ImageMagick ImageMagick-c++ cmake libpng-devel libtiff-devel mesa-libGLU-devel mesa-libGL-devel gdal-devel gdal sqlite-devel geos-devel proj-devel libsodium-devel libicu-devel tcl tk tk-devel fribidi-devel harfbuzz-devel udunits2-devel
apt install -y libcairo2-dev libssl-dev make libcurl4-openssl-dev libmysqlclient-dev unixodbc-dev libnode-dev default-jdk libxml2-dev git libfontconfig1-dev libfreetype6-dev zlib1g-dev libglpk-dev libjpeg-dev imagemagick libmagick++-dev gsfonts cmake libpng-dev libtiff-dev python3 libglu1-mesa-dev libgl1-mesa-dev libgdal-dev gdal-bin libgeos-dev libproj-dev libsqlite3-dev libsodium-dev libicu-dev tcl tk tk-dev tk-table libfribidi-dev libharfbuzz-dev libudunits2-dev
apt install -y libcairo2-dev libssl-dev make libcurl4-openssl-dev libmysqlclient-dev unixodbc-dev libnode-dev default-jdk libxml2-dev git libfontconfig1-dev libfreetype6-dev zlib1g-dev libglpk-dev libjpeg-dev imagemagick libmagick++-dev gsfonts cmake libpng-dev libtiff-dev python3 libglu1-mesa-dev libgl1-mesa-dev libgdal-dev gdal-bin libgeos-dev libproj-dev libsqlite3-dev libsodium-dev libicu-dev tcl tk tk-dev tk-table libfribidi-dev libharfbuzz-dev libudunits2-dev
apt install -y libcairo2-dev libssl-dev make libcurl4-openssl-dev libmysqlclient-dev unixodbc-dev libnode-dev default-jdk libxml2-dev git libfontconfig1-dev libfreetype6-dev zlib1g-dev libglpk-dev libjpeg-dev imagemagick libmagick++-dev gsfonts cmake libpng-dev libtiff-dev python3 libglu1-mesa-dev libgl1-mesa-dev libgdal-dev gdal-bin libgeos-dev libproj-dev libsqlite3-dev libsodium-dev libicu-dev tcl tk tk-dev tk-table libfribidi-dev libharfbuzz-dev libudunits2-dev
zypper install -y cairo-devel libopenssl-devel make libcurl-devel unixODBC-devel libxml2-devel git fontconfig-devel freetype2-devel zlib-devel libjpeg8-devel ImageMagick ImageMagick-devel libMagick++-devel cmake libpng16-compat-devel libtiff-devel glu-devel Mesa-libGL-devel sqlite3-devel tcl tk tk-devel libopenssl1_1
zypper install -y cairo-devel libopenssl-devel make libcurl-devel unixODBC-devel libxml2-devel git fontconfig-devel freetype2-devel zlib-devel libjpeg8-devel ImageMagick ImageMagick-devel libMagick++-devel cmake libpng16-compat-devel libtiff-devel glu-devel Mesa-libGL-devel sqlite3-devel tcl tk tk-devel
apt install -y libcairo2-dev libssl-dev make libcurl4-openssl-dev libmariadb-dev-compat libmariadb-dev unixodbc-dev libnode-dev default-jdk libxml2-dev git libfontconfig1-dev libfreetype6-dev zlib1g-dev libglpk-dev libjpeg-dev imagemagick libmagick++-dev gsfonts cmake libpng-dev libtiff-dev python3 libglu1-mesa-dev libgl1-mesa-dev libgdal-dev gdal-bin libgeos-dev libproj-dev libsqlite3-dev libsodium-dev libicu-dev tcl tk tk-dev tk-table libfribidi-dev libharfbuzz-dev libudunits2-dev

These installation commands are available from the Posit Public Package Manager. If you are using a hosted Posit Package Manager instance, the same installation commands are available on the setup page for your repository and on the details page for each package.

For more information, see the Posit Package Manager documentation.