OSX Mavericks上的rmagick - “找不到Magick-config in ......”

时间:2014-07-21 23:06:15

标签: ruby-on-rails macos imagemagick homebrew rmagick

当我尝试在OSX Mavericks上安装rmagick时,我收到此错误:

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

    /Users/adam/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for /usr/bin/clang... yes
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/Users/adam/.rvm/gems/ruby-2.0.0-p353/bin:/Users/adam/.rvm/gems/ruby-2.0.0-p353@global/bin:/Users/adam/.rvm/rubies/ruby-2.0.0-p353/bin:/Users/adam/.rvm/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:#/usr/local/bin:/usr/local/mysql-5.6.13-osx10.7-x86_64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/ImageMagick/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin

*** 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
    --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=/Users/adam/.rvm/rubies/ruby-2.0.0-p353/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /Users/adam/.rvm/gems/ruby-2.0.0-p353/gems/rmagick-2.13.2 for inspection.
Results logged to /Users/adam/.rvm/gems/ruby-2.0.0-p353/extensions/x86_64-darwin-13/2.0.0/rmagick-2.13.2/gem_make.out

~/.bash_profile中如下:

MYSQL=/usr/local/mysql/bin
export PATH=$PATH:$MYSQL
#export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
export PG_DUMP="/Applications/Postgres.app/Contents/MacOS/bin/"
#PATH=$PG_DUMP:$PATH
#export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export PATH=/usr/local/bin:$PATH

错误输出中没有这样的路径,它来自何处以及如何修复它?

谢谢。

1 个答案:

答案 0 :(得分:2)

你安装了ImageMagick吗?通过homebrew安装:

brew install imagemagick