I am having issue while trying to install \"rmagick\" gem on centos. Following is the output I am having. Can anyone please help me identifying what package I am missing
On debian (unstable) the correct packages needed to resolve this error were libmagickcore-6.q16-dev, imagemagick and libmagickwand-6-headers
I found them by using apt-file search MagickCore.pc and apt-file search MagickWand.h
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 variable
No 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
It doesn't look like you're missing any packages. The error message is important:
Perhaps you should add the directory containing `MagickCore.pc' to the PKG_CONFIG_PATH environment variable
Several of the answers on this superuser duplicate give good advice.
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@6
brew link --force imagemagick@6
gem install rmagick
The problem is, as the error puts it,
Package MagickCore was not found in the pkg-config search path
The solution is also suggested there:
add the directory containing
MagickCore.pcto thePKG_CONFIG_PATHenvironment variable
So,
Find MagickCore.pc location:
sudo find / -name MagickCore.pc
If it is not found, probably ImageMagick is not installed on your system — then install it (Google how to do it, as it depends on the OS)
Save it to the ENV var like that (make sure to put the path found in step 1):
PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
Retry installing RMagick