46
39

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac OS X環境にrmagickをインストールする決定版

Last updated at Posted at 2014-07-21

盛大にハマったのでメモ。

こんなエラーが出てるなら役に立つかもしれません。

ERROR:  Error installing rmagick:
	ERROR: Failed to build gem native extension.

    /Users/user/.rbenv/versions/2.1.1/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for clang... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
/usr/local/bin/Magick-config: line 41: pkg-config: command not found
/usr/local/bin/Magick-config: line 47: pkg-config: command not found
/usr/local/bin/Magick-config: line 50: pkg-config: command not found
/usr/local/bin/Magick-config: line 53: pkg-config: command not found
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.2. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.
ERROR:  Error installing rmagick:
	ERROR: Failed to build gem native extension.

    /Users/user/.rbenv/versions/2.1.1/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for clang... yes
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in ...

なにはともあれImageMagickをインストール
既に入ってたら再インストールした方が良いかもです。

brew install imagemagick

続けてpkg-configもインストール
これも再インストール推奨です
※自分の環境ではこれを再インストールして上手くいきました

brew install pkg-config

ここでやっとこさrmagickが入りました。

gem install rmagick

この件に関する記事は沢山見つかったのですが、
pkg-configを再インストールするのは見た事の無いパターンだったので残しておきます。

46
39
3

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
46
39

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?