我正在MacOSX上尝试安装rmagick
,但出于某种原因,我在安装时遇到了很多问题。
我找到了:this thread和this other thread,但是不起作用,看起来我有2个引用rmagick
而文件wand/MagickWand.h
不是由gem创建的。
我的env变量是:
$ echo "$PKG_CONFIG_PATH"
/usr/local/Cellar/imagemagick/6.8.9-1/include/ImageMagick-6/
我尝试安装gem时的日志是:
$ gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/Jarvis/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for /usr/bin/clang... yes
checking for Magick-config... yes
Warning: Found more than one ImageMagick installation. This could cause problems at runtime.
/usr/local/bin/Magick-config reports version 6.8.9 Q16 is installed in @@HOMEBREW_CELLAR@@/imagemagick/6.8.9-1
/opt/ImageMagick/bin/Magick-config reports version 6.8.8 Q16 is installed in /opt/ImageMagick
Using 6.8.9 Q16 from @@HOMEBREW_CELLAR@@/imagemagick/6.8.9-1.
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
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=/Users/Jarvis/.rvm/rubies/ruby-2.1.1/bin/ruby
extconf failed, exit code 1
Gem files will remain installed in /Users/Jarvis/.rvm/gems/ruby-2.1.1/gems/rmagick-2.13.2 for inspection.
Results logged to /Users/Jarvis/.rvm/gems/ruby-2.1.1/extensions/x86_64-darwin-12/2.1.0-static/rmagick-2.13.2/gem_make.out
答案 0 :(得分:2)
我的一个朋友在升级到小牛队时遇到了同样的问题,如果你正在使用brew,请尝试卸载该软件包并重新安装。
brew rm imagemagick
brew update && brew upgrade
和
brew reinstall imagemagick