LoginSignup
4
1

More than 5 years have passed since last update.

SierraにRmagickを入れる方法

Posted at

gem install rmagickでエラーが出る

rmagickをインストールしようとすると以下のようなエラーが出ました。

checking for clang... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.4.9)... no
checking for presence of MagickWand API (ImageMagick version >= 6.9.0)... no
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.16.0. 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.

どうやら最新のhomebrewではImageMagickの新しいバージョンが入ってしまうためにインストールができないようです。

ですので、ImageMagick6系をインストールします。

$ brew install imagemagick@6
$ brew link --force imagemagick@6
$ echo 'export PATH="/usr/local/opt/imagemagick@6/bin:$PATH"' >> ~/.bash_profile
$ bundle install

問題無くRmagickがインストールできました。

4
1
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
4
1