本文介绍了Bundle 无法在 Mac OSX 10.7 上安装 RMagick gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 ImageMagick 安装程序脚本安装了 ImageMagick https://github.com/maddox/magick-installer.我在 OSX Lion 10.7 上,使用 RVM,Ruby 1.9.3p125.

I've installed ImageMagick with ImageMagick installer script https://github.com/maddox/magick-installer. I am on OSX Lion 10.7, using RVM, Ruby 1.9.3p125.

问题似乎出在 MagickWand.h 上,这里是完整的日志

The problem seems to be with MagickWand.h here is the complete log

/Users/pdjimeno/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for /usr/bin/gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.1. 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
    --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/pdjimeno/.rvm/rubies/ruby-1.9.3-p125/bin/ruby

推荐答案

我建议你使用 brew 来管理你的二进制文件依赖关系.您可以使用 brew 轻松安装 imageMagick,如下所示:

I suggest that you use brew to manage your binary dependencies. You can easily install imageMagick with brew, like this:

brew install imagemagick

这是我的系统上的:

imagemagick 6.7.1-1
http://www.imagemagick.org
Depends on: jpeg, libtiff, little-cms, jasper
/usr/local/Cellar/imagemagick/6.7.1-1 (1389 files, 32M)
http://github.com/mxcl/homebrew/commits/master/Library/Formula/imagemagick.rb

在机器和 ruby​​ 版本方面,我的设置与您相同.

And I have the same setup as you have in terms of machine and ruby-version.

这篇关于Bundle 无法在 Mac OSX 10.7 上安装 RMagick gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 23:09