Ruby on rails 在Lion 10.7上安装imagemagick和rmagick

Ruby on rails 在Lion 10.7上安装imagemagick和rmagick,ruby-on-rails,imagemagick,rmagick,Ruby On Rails,Imagemagick,Rmagick,我使用了此链接,现在我也无法安装brew imagemagic 是我干的 gem安装rmagick——版本1.15.17 Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework

我使用了此链接,现在我也无法安装brew imagemagic

是我干的

gem安装rmagick——版本1.15.17

    Building native extensions.  This could take a while...
    ERROR:  Error installing rmagick:
ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby gem_extconf.rb

sh configure 

Configuring RMagick 1.15.17
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking for ruby... /usr/bin/ruby
checking Ruby version... 1.8.7
checking for Magick-config... Magick-config
checking ImageMagick version... 6.7.4
checking for library containing InitializeMagick... no
configure: error: Can't install RMagick. Can't find libMagick or one of the dependent         libraries.
              Check the config.log file for more detailed information.
RMagick configuration failed with status 1.

在安装rmagick之前,您应该提前安装imagemagick

可以使用

然后


brew install imagemagic引发错误:警告:您似乎已安装MacPorts或Fink。与其他软件包管理器一起安装的软件会导致自制软件出现已知问题。如果公式生成失败,请卸载MacPorts/Fink并重试。
brew install imagemagick
gem install rmagick