在Lion 10.7上安装imagemagick和rmagick

时间:2012-03-05 09:42:14

标签: ruby-on-rails imagemagick rmagick

我使用了这个链接http://rmagick.rubyforge.org/install-osx.html,现在我也无法做brew install imagemagick ..

我做了这个

gem install rmagick --version 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.

1 个答案:

答案 0 :(得分:0)

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

可以使用brew

brew install imagemagick

然后

gem install rmagick