LoginSignup
6

More than 5 years have passed since last update.

homebrew の imagemagick 6.8.0-10 と rmagick 2.13.1 の組み合わせでエラー

Posted at

homebrew の imagemagick 6.8.0-10 と rmagick 2.13.1 の組み合わせでエラーが発生する。

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/kohgami/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb 
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for /usr/local/bin/gcc-4.2... yes
checking for Magick-config... yes

Warning: Found more than one ImageMagick installation. This could cause problems at runtime.
         /usr/local/bin/Magick-config reports version 6.8.0 Q16 is installed in /usr/local/Cellar/imagemagick/6.8.0-10
         /usr/local/Cellar/imagemagick/6.8.0-10/bin/Magick-config reports version 6.8.0 Q16 is installed in /usr/local/Cellar/imagemagick/6.8.0-10
Using 6.8.0 Q16 from /usr/local/Cellar/imagemagick/6.8.0-10.

checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... yes
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.

ライブラリが見えないらしいので、シンボリックリンクを貼る。

$ cd /usr/local/lib
$ ln -s libMagick++-Q16.7.dylib libMagick++.dylib
$ ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib
$ ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib

リトライ

$ bundle install

無事成功。
他に対応方法あったら教えてください。。。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6