Problem installing svglite in R in Linux Ubuntu and Fedora

    I need svglite package for a project I am working on but when I try to install this package in R, I get the following error:

    Code
    ERROR: dependencies ‘systemfonts’, ‘textshaping’ are not available for package ‘svglite’

    Any ideas?

    • Best Answer
    • Admin

    Based on the error message, "ERROR: dependencies 'systemfonts' and 'textshaping' are not available for package 'svglite,'" the installation is failing because R cannot install these two required packages. This often happens on Linux systems like Ubuntu when R packages need system libraries to be installed before they can be compiled.

    To resolve this issue, you need to install the required system development libraries using apt-get, and then install the R packages.

    If you are on Ubuntu follow the below steps:

    1- Install required libraries:

    Open your Linux Terminal and run the following command to install libfontconfig1-dev , libharfbuzz-dev and libfribidi-dev

    For Ubuntu:

    Bash
    sudo apt install libfontconfig1-dev libharfbuzz-dev libfribidi-dev

    For Fedora:

    Bash
    sudo dnf install libfontconfig1-dev libharfbuzz-dev libfribidi-dev


    2- Then in R or R-Studio install your packages:

    R
    install.packages("systemfonts")
    install.packages("textshaping")
    install.packages("svglite")

    This should resolve the problem!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!