我正在尝试安装 Locomotive CMS,但在安装时出现关于 rmagick 的错误:
An error occurred while installing rmagick (2.12.2), and Bundler cannot
continue.
Make sure that `gem install rmagick -v '2.12.2'` succeeds before bundling.
我检查了日志,这是 rmagick 显示的错误:
$ gem install rmagick -v '2.12.2'
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:107:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
extconf.rb:107:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
checking for /usr/bin/clang... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.3.5... 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
Can't install RMagick 2.12.2. 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.
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=.rvm/rubies/ruby-2.1.0/bin/ruby
--with-MagickCorelib
--without-MagickCorelib
--with-Magicklib
--without-Magicklib
extconf failed, exit code 1
Gem files will remain installed in .rvm/gems/ruby-2.1.0/gems/rmagick-2.12.2 for inspection.
Results logged to .rvm/gems/ruby-2.1.0/extensions/x86_64-darwin-12/2.1.0-static/rmagick-2.12.2/gem_make.out
我在 SO 和 Google 上发现了类似的问题,但我已经尝试了大约 3 个小时的各种修复,但仍然无法正常工作。请指教,谢谢!