2017-08-14 119 views
3

雖然我試圖安裝rmagic,它顯示了以下錯誤無法安裝RMagick 2.15.4。找不到MagickWand.h

ERROR: Error installing rmagick: 
    ERROR: Failed to build gem native extension. 

/Users/***/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20170814- 
44982-1i5w4mc.rb extconf.rb 
checking for gcc... yes 
checking for Magick-config... no 
checking for pkg-config... yes 
checking for outdated ImageMagick version (<= 6.4.9)... no 
checking for Ruby version >= 1.8.5... yes 
checking for stdint.h... yes 
checking for sys/types.h... yes 
checking for wand/MagickWand.h... no 

Can't install RMagick 2.15.4. Can't find MagickWand.h. 
*** 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. 

我使用MacOS的山脈,紅寶石版本2.2.3

回答

5

我有這個問題一段時間以前。你需要安裝imagemagick。每GitHub的回購爲rmagic寶石

預請求數:

ImageMagick的版本6.4.9或更高版本。您可以從www.imagemagick.org獲取ImageMagick。

我相信你也可以沖泡

$ brew install [email protected] 
$ brew link [email protected] --force 
$ gem install rmagick 
+2

與ImageMagick的V7 +上發生的問題,theartofbeing解決方案可以幫助你從ImageMagick的7降級到6,使RMagick寶石安裝工作進行安裝。 – Vala