3
我一直在爲此苦苦掙扎。我運行的是Mac OS 10.7(Mountain Lion),我正在嘗試安裝RMagick gem,以便在我的Rails 3應用程序中使用它。我已經用homebrew安裝了imagemagick,而且看起來似乎能夠成功完成。我還安裝了XQuartz軟件包。當我添加「rmagick」我的Gemfile和運行捆綁安裝,我得到這個錯誤:無法在OS X Mountain Lion上安裝RMagick
Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/Andrew/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for clang... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /Users/Andrew/.rvm/rubies/ruby-1.9.3-p125/bin:/Users/Andrew/.rvm/gems/[email protected]/bin:/Users/Andrew/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin
*** 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
--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/Andrew/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
Gem files will remain installed in /Users/Andrew/.rvm/gems/[email protected]/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/Andrew/.rvm/gems/[email protected]/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
An error occured while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.
Process finished with exit code 5
任何想法,爲什麼發生這種情況?
我還需要告訴我用的是全球寶石安裝rmagick寶石之前RVM。我第一次安裝它時,它安裝到了錯誤的gemset中,並且沒有被應用程序看到 – Andrew