3
나는 한동안이 문제에 시달렸습니다. 저는 Mac OS 10.7 (Mountain Lion)을 사용하고 있으며 Rails 3 앱에서 사용할 수 있도록 RMagick 젬을 설치하려고합니다. 나는 이미 imagemagick을 homebrew와 함께 설치했다. 그리고 그것은 성공적으로 끝내는 것처럼 보였다. XQuartz 패키지도 설치했다. 내 gemfile에 'rmagick'을 추가하고 번들 설치를 실행하면 다음 오류가 발생합니다.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 gem을 설치하기 전에 글로벌 gemset을 사용하고 있다고 RVM에 알릴 필요가있었습니다. 처음 설치했을 때 잘못된 gemset에 설치되어 앱에서 보지 못했습니다. – Andrew