最佳答案
当我试图安装rmagick gem时,我得到如下所示的错误。我在雪豹10.6使用RVM, Ruby 1.9.2-head和Rails 3.05。对类似问题的回答建议安装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重新安装了它们。超级简单,有一个巨大的包目录,更新/卸载也很容易!< / p >