Chakreshwar Sharma
Chakreshwar Sharma

Reputation: 2610

Unable to install Rmagick

I am installing rmagick in mac system, I have installed imagemagick version 7 by using the command brew install imagemagick , now I am executing gem install rmagick but I am getting the below error.

Can't install RMagick 2.16.0. Can't find MagickWand.h.

I have added export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH" in my bashfile but no luck

Upvotes: 2

Views: 906

Answers (2)

Chakreshwar Sharma
Chakreshwar Sharma

Reputation: 2610

Finally , I downgraded the version of imagemagick to make it working i.e.

brew uninstall imagemagick
brew uninstal imagemagick@6

Then, set the path for MagicWand & MagicCore.h

export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick\@6/6.9.7-6/lib/pkgconfig/

Upvotes: 1

Mark Setchell
Mark Setchell

Reputation: 207375

Try uninstalling ImageMagick and re-installing with the --build-from-source option and that will get you the header you seek:

brew rm imagemagick
brew install imagemagick --build-from-source <ANY OTHER OPTIONS>

Now check you have it:

find /usr -name "MagickWand.h"
/usr/local/Cellar/imagemagick/7.0.4-6/include/ImageMagick-7/MagickWand/MagickWand.h

Upvotes: 0

Related Questions