"rmagick" gem installation issue "rmagick" gem installation issue ruby ruby

"rmagick" gem installation issue


try installing

  sudo apt-get install libmagickwand-dev imagemagick


This ImageMagick 7 with RMagick 2.16 on MacOS Sierra Can't find MagickWand.h works for Rmagick 2.16.

brew install imagemagick@6brew link --force imagemagick@6gem install rmagick


The error message says:

Package MagickCore was not found in the pkg-config search path.Perhaps you should add the directory containing `MagickCore.pc'to the PKG_CONFIG_PATH environment variableNo package 'MagickCore' found

It seems you missing no package at all, you just have to tell pkg-config where to find the MagickCore.pc file to build the extension. If you have installed the package ImageMagick-devel using yum the file should be inside the directory /usr/lib/pkgconfig or /usr/lib64/pkgconfig (depending on your architecture). Check with this command (from now I assume you are on a amd64 machine, if it's not the case replace lib64 with lib):

$ find /usr/lib64/pkgconfig -name MagickCore.pc

If the file is there you just have to install rmagick with this command:

$ PKG_CONFIG_PATH='/usr/lib64/pkgconfig' gem install rmagick