10

sudo gem install rmagickを使用してMountainLionに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.
4

4 に答える 4

20

これは私のために働いた...

以前の回答で述べたように:

$ 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 で次の 2 つのパスを使用しました。

$ 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

そして、何時間もの研究の末、ついに機能しました。それが誰かを助けることを願っています。

于 2013-05-13T19:07:57.473 に答える
17

Homebrew で imagemagick を再インストールします。

brew remove imagemagick
brew install imagemagick --disable-openmp --build-from-source

または、次のシェル スクリプトを使用してインストールすることもできます::

https://github.com/maddox/magick-installer
于 2012-07-31T03:33:50.153 に答える
7

私はこのRmagickonMountain Lionのインストールの問題にしばらく苦労していて、さまざまな解決策を試しましたが、これが最終的に私のためにトリックを実行したものです:

Homebrewでimagemagickを再インストールします:

$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source

その後

$ gem install rmagick -v '2.13.2'

このソリューションを投稿および編集してくれたAndrewNesbittとPhillipeGustavoに感謝します。

于 2013-03-02T22:39:39.503 に答える