ps:感觉是硬翻译过来的有点乱。。仅供参考
原文地址:http://codego.net/440981/
我已经安装了ImageMagick ImageMagick的使用安装脚本,我在OSX 10.7狮子,采用RVM,ruby1.9.3p125。 这个问题似乎是与MagickWand.h有关
这里是日志
/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
以下是尝试:
1 我建议冲泡管理您的二进制文件的依赖关系。您可以轻松地与酿造安装ImageMagick的,就像这样:
brew install imagemagick
这是我对我的系统:
imagemagick 6.7.1-1 CodeGo.net Depends on: jpeg, libtiff, little-cms, jasper/usr/local/Cellar/imagemagick/6.7.1-1 (1389 files, 32M) CodeGo.net
和我有设置为你的机器和ruby版本的条款。
2.解决这个设定包括您目前的ImageMagick的安装路径:
与酿造ImageMagick的安装brew install imagemagick
查找图书馆
$ mdfind MagickWand.h/usr/local/Cellar/imagemagick/6.7.5-7/include/ImageMagick/wand/MagickWand.h
安装的RMagickgem
$ C_INCLUDE_PATH=/path gem install rmagick
例如:
$ C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.5-7/include/ImageMagick/ gem install rmagick
3.如果您收到包装xxx
未找到。 找到包,并添加它到目录路径PKG_CONFIG_PATH
在你的变量~/.bash_login
或~/.bash_profile
文件中。 例如: 如果你得到的错误:Package MagickCore was not found in the pkg-config search path.
寻找到的文件是:$ mdfind magickcore.pc/usr/local/homebrew/Cellar/imagemagick/6.7.7-6/lib/pkgconfig/MagickCore.pc
添加到您的bash_login或bash_profile文件:export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:/usr/local/homebrew/Cellar/imagemagick/6.7.7-6/lib/pkgconfig/:$PKG_CONFIG_PATH"
源的bash_login / profile文件
1)由安装程序进行安装 2)尽量创业板安装的RMagick 如果检查棒/ MagickWand.h ...无 类型mdfind MagickWand.h
找到喜欢的东西/Users/user/ImageMagick-6.8.3/include/ImageMagick-6/wand/MagickWand.h
并在终端C_INCLUDE_PATH=/Users/user/ImageMagick-6.8.3/include/ImageMagick-6/ gem install rmagick
如果,以后你有这样的错误(一个有它)“包装MagickCore没有在pkg配置搜索路径中找到。” 类型mdfind MagickCore.pc
找到喜欢的东西的/ opt / ImageMagick的/ lib中/ pkgconfig / MagickCore.pc 终于在终端中输入:PKG_CONFIG_PATH=/opt/ImageMagick/lib/pkgconfig/ gem install rmagick
5.当我反对这个问题,它无法找到MagickCore.pc,所以我这样做;$ mdfind MagickCore.h/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/magick/MagickCore.h/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/magick/MagickCore.h$ export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/$ gem install rmagick
和它的工作!
6.我不得不添加两个ENV变量,使其工作。这样C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/ PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/Cellar/imagemagick/6.7.7-6/lib/pkgconfig/ gem install rmagick