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

Viewed 1558

While I'm trying to install rmagic, it shows following error

ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

/Users/***/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20170814-
44982-1i5w4mc.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.4.9)... no
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.15.4. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

I'm using MacOS sierra, ruby version 2.2.3

2 Answers
brew unlink pkgconfig
bundle install
brew link pkgconfig

did the trick for me

Related