[英]Can't install rmagick in Mountain Lion
嘗試在山獅中使用sudo gem install rmagick安裝rmagick並獲得以下內容。 任何幫助表示贊賞。 論壇的答案都沒有奏效。
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for xcrun... 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... yes
checking for InitializeMagick() in -lMagickCore... no
checking for InitializeMagick() in -lMagick... no
checking for InitializeMagick() in -lMagick++... no
Can't install RMagick 2.13.1. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.
這對我有用......
如前面的答案所述:
$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source
我得到了magicwand.sh:
$ mdfind MagickWand.h -->
/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/wand/MagickWand.h
然后我取出了除實際文件名之外的整個路徑並添加了C_INCLUDE_PATH =例如:
/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/wand/
--->
C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/
然后我找了MagickCore.pc
$ mdfind MagickCore.pc
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/MagickCore.pc
與以前一樣:
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/
--->
PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/
然后我使用gem install安裝這兩個路徑:
$ sudo C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/ PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/ gem install rmagick
經過數小時的研究,它終於奏效了。 希望它可以幫助某人。
用Homebrew重新安裝imagemagick:
brew remove imagemagick
brew install imagemagick --disable-openmp --build-from-source
或者你可以使用這個shell腳本安裝::
https://github.com/maddox/magick-installer
我一直在為Mountain Lion安裝問題上的Rmagick掙扎了一段時間,並嘗試了許多不同的解決方案,這就是最終為我做的訣竅:
用Homebrew重新安裝imagemagick:
$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source
然后
$ gem install rmagick -v '2.13.2'
感謝Andrew Nesbitt和Phillipe Gustavo發布和編輯此解決方案!
以下為我解決了這個問題:
brew remove imagemagick
brew install imagemagick --disable-openmp --build-from-source
cd /usr/local/Cellar/imagemagick/6.8.8-9/lib
ln -s libMagick++-6.Q16.3.dylib libMagick++.dylib
ln -s libMagickCore-6.Q16.2.dylib libMagickCore.dylib
ln -s libMagickWand-6.Q16.2.dylib libMagickWand.dylib
gem install rmagick -v '2.12.2'
來源: http : //winstonyw.com/2013/03/21/installing-imagemagick-and-rmagick/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.