我见过其他人有同样的问题 installing RMagick on Mountain Lion 但是没有一个建议的解决方案让我成功安装 rmagick。
这是我收到的错误消息:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
checking for Ruby version >= 1.8.5... yes
checking for /usr/local/bin/gcc-4.2... 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... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... yes
checking for InitializeMagick() in -lMagickCore... no
checking for InitializeMagick() in -lMagick... no
checking for InitializeMagick() in -lMagick++... no
Can't install RMagick 2.13.1. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.
*** 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.
我做过的事情:
Installed XCode
Installed the command line tools
Installed XQuartz
Installed homebrew with imagemagick library
Installed most recent version of RVM
Symlinked GCC
Uninstalled and reinstalled both RVM and imagemagick
为什么我仍然无法下载 rmagick 的任何想法?
最佳答案
看来这是 Homebrew github repo ( https://github.com/mxcl/homebrew/issues/16625 ) 上报告的一个问题,指责 rmagick 本身不支持更新版本的 imagemagick。在同一问题上( https://github.com/mxcl/homebrew/issues/16625#issuecomment-11519383 ),您可以找到此链接: https://coderwall.com/p/wnomjg 这实际上对我有用。这就是他所做的:
cd /usr/local/Cellar/imagemagick/6.8.0-10/lib
ln -s libMagick++-Q16.7.dylib libMagick++.dylib
ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib
ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib
希望这可以帮助。
关于imagemagick - 在 Mountain Lion 上安装 Rmagick 时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13942443/