LoginSignup
12
10

More than 5 years have passed since last update.

`gem install rmagick`でエラった時にいろいろやって最終的に解決した方法

Last updated at Posted at 2014-07-16

imagemagickのインストール

brew install imagemagick
Warning: imagemagick-6.8.9-1 already installed

はいそうですね。入れた記憶あります。

pkg-configとlibtoolを再インストール

pkg-configとlibtoolをアンインストールして再度インストールすればいけるよ、って言ってる人いる。
RMagick のインストールでエラー

brew uninstall pkg-config libtool

再インストール。

brew install pkg-config libtool

imagemagickのファイルにリンクを張ってやる

最後、以下のエラー出た。

・・・
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
checking for Ruby version >= 1.8.5... yes
checking for /usr/local/bin/gcc-4.2... yes
checking for Magick-config... yes
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.
・・・

で、いろいろ調べたらimagemagickで使ってるファイルにリンクを張ってやる(?)といいっぽい。

cd /usr/local/Cellar/imagemagick/6.8.9-1/lib/
ln -s libMagick++-6.Q16.3.dylib libMagick++.dylib
ln -s libMagickCore-6.Q16.2.dylib libMagickCore.dylib
ln -s libMagickWand-6.Q16.2.dylib libMagickWand.dylib

上記実行して再度gem install rmagickしたら解決した!!!

はぁ、疲れた。

12
10
0

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
12
10