Rmagick Installation: Can't Find Magickwand.H

RMagick installation: Can't find MagickWand.h

Something was severely wrong on my system, so badly that it was completely f*d up, but I was finally to able to install RMagick for Ruby 1.8.7 again after I installed

  • an older version of ImageMagick with Homebrew
  • a new Ruby version of 1.8.7
  • a new version of GCC

The installation of a new Ruby version with RVM rvm install 1.8.7 also installed a new GCC compiler: it removed an older GCC version 4.6 and installed GCC version 4.9. Apparently GCC was not able to find the right headers despite pkg-config.

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

I had a similar issue with running

$ gem install rmagick

First of all, do you have imagemagick installed? If you're not sure, run

$ convert --version

If you do, you probably either installed it with fink or macports (maybe homebrew?). What is happening is that rvm can't find the imagemagick directory.

After reading
https://superuser.com/questions/361435/i-have-compiled-imagemagick-on-my-centos-and-rmagick-wont-install
I exported the imagemagick path by adding

$ export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"

to my ~/.bash_profile, sourcing the new profile, then running:

gem install rmagick

It worked for me after I did this.

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

I have had the same issue for about a month, Mark (ever since the Imagemagick 7 update). I'm using homebrew on OSX Sierra.

For future visitors to this question, you can try linking and unlinking pkgconfig (brew unlink pkgconfig && brew link pkgconfig) or specifying the path as Mayur describes, but if those don't work you'll need to install Imagemagick 6 from source as Mark has done:

$ brew uninstall imagemagick
$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/6f014f2b7f1f9e618fd5c0ae9c93befea671f8be/Formula/imagemagick.rb

I believe the issue ultimately lies with pkgconfig, so when you see an update to pkgconfig, that should be the tipoff to try again.

Installing RMagick gem -- Can't find MagickWand.h

Turns out the answer was in Can't install RMagick 2.13.1. Can't find MagickWand.h. after all. I had just followed the suggestion incorrectly.

C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick gem install rmagick

This installed rmagick gem successfully.

Unfortunately, rmagic is still not working with CarrierWave :-(, but that is a different problem altogether.

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

I had this issue a while back. You need to install imagemagick. Per the github repo for the rmagic gem

Pre-reqs:

ImageMagick Version 6.4.9 or later. You can get ImageMagick from www.imagemagick.org.

I believe you can also install it with brew

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

ImageMagick 7 with RMagick 2.16 on MacOS Sierra Can't find MagickWand.h

I have just encountered and solved this issue on a new Mac running Sierra. There seems to be no solution for ImageMagick 7 at this time.

  1. Uninstall existing imagemagick if needed

  2. Install version 6:

    brew install imagemagick@6

  3. Since this is keg-only, you should then force-link it:

    brew link --force imagemagick@6

This installed imagemagick version 6.9.7-4 for me.

Afterwards, the gem then installed successfully. I am including the version numbers for future readers:

Installing rmagick 2.13.4 with native extensions



Related Topics



Leave a reply



Submit