尝试安装rmagick gem时出现以下错误。我在使用RVM,Ruby 1.9.2-head和Rails 3.05的Snowleopard 10.6上。对类似问题的回答建议安装ImageMagick,我成功完成了该操作。其他建议安装“ libmagick9-dev库”,但是,我不知道如何执行此操作。
我是一名新开发人员,非常感谢您对现有说明或资源的任何帮助或指示。谢谢!
jjdevenuta(opal)$ gem install rmagick
Fetching: rmagick-2.13.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/jjdevenuta/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /Users/jjdevenuta/.rvm/gems/ruby-1.9.2-head@rails3/bin:/Users/jjdevenuta/.rvm/gems/ruby-1.9.2-head@global/bin:/Users/jjdevenuta/.rvm/rubies/ruby-1.9.2-head/bin:/Users/jjdevenuta/.rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/usr/X11/bin
*** 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/jjdevenuta/.rvm/rubies/ruby-1.9.2-head/bin/ruby
更新 如果您是Mac / OS X用户,我强烈建议您使用Homebrew作为软件包安装程序/管理器。您可以在这里找到它。自从最初提出这个问题以来,我已经删除了先前安装的所有rmagick和imagemagick之类的东西,并使用Homebrew重新安装了它们。超级轻松,带有庞大的软件包目录,更新/卸载也很轻松!