1
在過去,我使用了RMagick,並且安裝了Imagemagick,最近我捆綁安裝了新版本的RMagick。使用RMagick創建Gem安裝錯誤
重新啓動我的Rails服務器時出現錯誤。所以我決定卸載第一個imagemagick(從brew),然後卸載rmagick。
我試過重新安裝rmagick,我有些麻煩(第一個是我無法從bundle命令安裝)。我試圖gem install rmagick -v '2.13.1'
但我得到以下權限錯誤:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/username/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper
我也試圖與sudo
,得到了
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/username/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper
usercomputer:~ Username$ sudo gem install rmagick -v '2.13.1'
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/username/.rvm/rubies/ruby-1.9.3-p194/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 /usr/bin/gcc-4.2... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /Users/username/.rvm/gems/ruby-1.9.3-p194/bin:/Users/Aurelien/.rvm/gems/[email protected]/bin:/Users/username/.rvm/rubies/ruby-1.9.3-p194/bin:/Applications/MAMP/bin/php5/bin:/Applications/MAMP/htdocs/cake/cake/cake/console:/Users/username/.rvm/gems/ruby-1.9.3-p194/bin:/Users/username/.rvm/gems/[email protected]/bin:/Users/username/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/username/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/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
--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/username/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
Gem files will remain installed in /Users/username/.rvm/gems/ruby-1.9.3-p194/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/username/.rvm/gems/ruby-1.9.3-p194/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
當然我做了一些沿途的錯,但我不知道是什麼?
謝謝你的回答。
我猜rmagick不列入支持我的機器Rmagick最新ImageMagick的AFAIK最後的測試與ImageMagick的版本成功合作6.7.0 – Viren
也許它只是缺少像一些路徑描述[這裏](http://stackoverflow.com/questions/9050419/cant-install-rmagick-2-13-1-cant-find-magickwand-h) –
這看起來像你沒有權限訪問正確的目錄。你是否以root用戶身份安裝imagemagick? 也許你可以試試'gem pristine rmagick' - 這爲我解決了一個問題,RMagick是在升級後針對imagemagick的錯誤版本構建的 - 但在你的情況下,我敢打賭imagemagick是由root安裝的。 – Tigraine