2

I keep getting this error when I'm installing rmagick inside rvm.

checking for InitializeMagick() in -lMagickCore... no
checking for InitializeMagick() in -lMagick... no
checking for InitializeMagick() in -lMagick++... no
Can't install RMagick 2.13.1. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.

Here's my current setup:

Snow Leopard 10.6.7
XCode 3.2.6
RVM 1.6.1
Ruby Over RVM (ree1.8.7)
Homebrew 0.8
ImageMagick 6.6.9-4 c/o Homebrew

After installing imagemagick with Homebrew, I was able to install rmagick using the system ruby

rvm system
sudo gem install rmagick

Any ideas?

JAF
  • 31
  • 1
  • 4
  • Try uninstalling *ImageMagick* and reinstalling it as described [here](http://stackoverflow.com/a/7973760/356895) and [here](http://stackoverflow.com/questions/4290759/error-installing-rmagick-on-mac-os-x/4290798#4290798). And [here](https://gist.github.com/2763243) a similar installation instruction. – JJD May 21 '12 at 23:43

2 Answers2

7

I think that there was a problem with the imagemagick package from homebrew for a small period of time. I just walked through re-installing rmagick on my system (also 10.6.7 with RVM). First I re-installed imagick:

brew uninstall imagick

and then

brew install imagick

Finally I did

gem install rmagick

Which compiled with no problems. I can't see why it would cause you problems but you don't need to use sudo when use rvm unless you installed RVM as root.

1

RMagick expects for Homebrew to provide certain symlinks which don't exit, causing a whole lotta problems.

You can run this gist to create the symlinks specific to your ImageMagick installation that are needed for RMagick to work.

fny
  • 31,255
  • 16
  • 96
  • 127