0

Whenever I try to install the rmagick gem using sudo gem install rmagick the install fails when it tries to include a header file called wand/MagicWand.h

The exact error from the log file is:

gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I.  -I$MAGICK_HOME/include/ImageMagick  -I/include/ImageMagick -fopenmp  conftest.c -o conftest.i"
conftest.c:1:29: error: wand/MagickWand.h: No such file or directory
checked program was:
/* begin */
1: #include <wand/MagickWand.h>
/* end */

The $MAGICK_HOME env variable is set to /usr/bin/imagemagick The header file it is looking for is located in /usr/bin/imagemagick/include/ImageMagick/wand/MagickWand.h

I was trying to follow the instructions found here. I am installing this on an Intel iMac running Snow Leopard.

John
  • 29,546
  • 11
  • 78
  • 79
  • 3
    An alternative approach is to use brew instead of macports. https://github.com/mxcl/homebrew there is info on how to install brew and then you can install imagemagick by using `brew install imagemagick`. Read the wiki to see how to clear out macport installations. – sorens Feb 27 '11 at 09:02
  • +1 homebrew solved all of my problems with installing ImageMagick on Snow Leopard. – theTRON Feb 27 '11 at 09:05
  • Homebrew actually solved my problem. Thanks a lot sorens. – Pterofractal Mar 03 '11 at 08:01
  • @sorens: Can you post your comment as an answer so we can upvote it and get this question off the Unanswered list? Thanks. – Bill the Lizard Mar 03 '11 at 12:05
  • sure thing. see answer below... – sorens Mar 03 '11 at 14:46

1 Answers1

5

An alternative approach is to use Brew instead of macports. There is information on how to install brew and then you can install imagemagick by using the command brew install imagemagick. Read the wiki to see how to clear out macport installations.

sorens
  • 4,975
  • 3
  • 29
  • 52
  • FWIW, a brew install of imagemagick wasn't enough for me. I also had to brew install pkg-config, otherwise doing a gem install of rmagick would bail. – Tom Lianza Feb 29 '12 at 04:55