ps:感覺是硬翻譯過來的有點亂。。僅供參考
原文地址:http://codego.net/440981/
我已經(jīng)安裝了ImageMagick ImageMagick的使用安裝腳本,我在OSX 10.7獅子,采用RVM,ruby1.9.3p125。 這個問題似乎是與MagickWand.h有關(guān)
這里是日志
/Users/pdjimeno/.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 /usr/bin/gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing MagickCore.pc
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing MagickCore.pc
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing MagickCore.pc
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing MagickCore.pc
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no
Can't install RMagick 2.13.1. 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.
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/pdjimeno/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
以下是嘗試:
1 我建議沖泡管理您的二進制文件的依賴關(guān)系。您可以輕松地與釀造安裝ImageMagick的,就像這樣:
brew install imagemagick
這是我對我的系統(tǒng):
imagemagick 6.7.1-1 CodeGo.net Depends on: jpeg, libtiff, little-cms, jasper/usr/local/Cellar/imagemagick/6.7.1-1 (1389 files, 32M) CodeGo.net
和我有設置為你的機器和ruby版本的條款。
2.解決這個設定包括您目前的ImageMagick的安裝路徑:
與釀造ImageMagick的安裝brew install imagemagick
查找圖書館
$ mdfind MagickWand.h/usr/local/Cellar/imagemagick/6.7.5-7/include/ImageMagick/wand/MagickWand.h
安裝的RMagickgem
$ C_INCLUDE_PATH=/path gem install rmagick
例如:
$ C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.5-7/include/ImageMagick/ gem install rmagick
3.如果您收到包裝xxx
未找到。 找到包,并添加它到目錄路徑PKG_CONFIG_PATH
在你的變量~/.bash_login
或~/.bash_profile
文件中。 例如: 如果你得到的錯誤:Package MagickCore was not found in the pkg-config search path.
尋找到的文件是:$ mdfind magickcore.pc/usr/local/homebrew/Cellar/imagemagick/6.7.7-6/lib/pkgconfig/MagickCore.pc
添加到您的bash_login或bash_profile文件:export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:/usr/local/homebrew/Cellar/imagemagick/6.7.7-6/lib/pkgconfig/:$PKG_CONFIG_PATH"
源的bash_login / profile文件
1)由安裝程序進行安裝 2)盡量創(chuàng)業(yè)板安裝的RMagick 如果檢查棒/ MagickWand.h ...無 類型mdfind MagickWand.h
找到喜歡的東西/Users/user/ImageMagick-6.8.3/include/ImageMagick-6/wand/MagickWand.h
并在終端C_INCLUDE_PATH=/Users/user/ImageMagick-6.8.3/include/ImageMagick-6/ gem install rmagick
如果,以后你有這樣的錯誤(一個有它)“包裝MagickCore沒有在pkg配置搜索路徑中找到?!?類型mdfind MagickCore.pc
找到喜歡的東西的/ opt / ImageMagick的/ lib中/ pkgconfig / MagickCore.pc 終于在終端中輸入:PKG_CONFIG_PATH=/opt/ImageMagick/lib/pkgconfig/ gem install rmagick
5.當我反對這個問題,它無法找到MagickCore.pc,所以我這樣做;$ mdfind MagickCore.h/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/magick/MagickCore.h/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/magick/MagickCore.h$ export PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/$ gem install rmagick
和它的工作!
6.我不得不添加兩個ENV變量,使其工作。這樣C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/ PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/Cellar/imagemagick/6.7.7-6/lib/pkgconfig/ gem install rmagick