尝试在山狮中使用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.
Run Code Online (Sandbox Code Playgroud)
Phi*_*lip 20
这对我有用......
如前面的答案所述:
$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source
Run Code Online (Sandbox Code Playgroud)
我得到了magicwand.sh:
$ mdfind MagickWand.h -->
/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/wand/MagickWand.h
Run Code Online (Sandbox Code Playgroud)
然后我取出了除实际文件名之外的整个路径并添加了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/
Run Code Online (Sandbox Code Playgroud)
然后我找了MagickCore.pc
$ mdfind MagickCore.pc
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/MagickCore.pc
Run Code Online (Sandbox Code Playgroud)
与以前一样:
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/
--->
PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/
Run Code Online (Sandbox Code Playgroud)
然后我使用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
Run Code Online (Sandbox Code Playgroud)
它经过数小时的研究后终于奏效了.希望它可以帮助某人.
Phi*_*avo 17
用Homebrew重新安装imagemagick:
brew remove imagemagick
brew install imagemagick --disable-openmp --build-from-source
Run Code Online (Sandbox Code Playgroud)
或者你可以使用这个shell脚本安装::
https://github.com/maddox/magick-installer
Run Code Online (Sandbox Code Playgroud)
小智 7
我一直在为Mountain Lion安装问题上的Rmagick挣扎了一段时间,并尝试了许多不同的解决方案,这就是最终为我做的诀窍:
用Homebrew重新安装imagemagick:
$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source
Run Code Online (Sandbox Code Playgroud)
然后
$ gem install rmagick -v '2.13.2'
Run Code Online (Sandbox Code Playgroud)
感谢Andrew Nesbitt和Phillipe Gustavo发布和编辑此解决方案!