23時ごろには寝て7時には起きる生活にしてるのに体調がめっぽうよくない。ずっと倦怠感、しばしば目痛と頭痛がする。

ビオフェルミンのおかげか便通は比較的良くなってる。

$ sudo /usr/bin/xcode-select  -switch /Applications/Xcode.app/Contents/Developer
$ sudo PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig gem install rmagick

で入った。

経緯

imagemagick 自体は sudo brew install imagemagick で入れてある。

Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

        /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for xcrun... 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... no
checking for sys/types.h... no
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.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/rmagick-2.13.2 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/rmagick-2.13.2/ext/RMagick/gem_make.out

Can't find MagickWand.h. でググると「PKG_CONFIG_PATH さえ設定したら入るよwwww」的なエントリが散見されるが、ちゃんと mkmf.log を見るべきである。しかし我々は mkmf.log の居場所をエラーログから知ることはできない。

mdfind mkmf.log すると /Library/Ruby/Gems/1.8/gems/rmagick-2.13.2/ext/RMagick/mkmf.log が出てきたので、システム ruby の場合このへんにあるようだ。エラーメッセージにフルパスを出さない理由は何かあるのか。

mkmf.log を見てみると

Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.

とかでている。最近の Xcode は /Developer を使うのをやめたらしい。アップデートのタイミングに自分で xcode-select しろよ。

  1. トップ
  2. tech
  3. Mac に RMagick がインストールできない。