+2 votes
in Programming Languages by (51.8k points)

While installing the R package "magick", I got the following error message. How to fix this error? I am running Ubuntu 22 OS.

Package Magick++ was not found in the pkg-config search path.

ERROR: configuration failed for package ‘magick’

Warning in install.packages :

  installation of package ‘magick’ had non-zero exit status

1 Answer

+2 votes
by (281k points)

You need to install libmagick++-dev first. Then you can install the R package "magick."

To install libmagick++-dev, run the following commands on the Ubuntu terminal.

sudo apt update
sudo apt-get install -y libmagick++-dev

Once the installation of libmagick++-dev is finished, you can install the R package.