Tried installing rmagick in Mountain Lion with sudo gem install rmagick and got the following. Any help is appreciated. None of the forum answers worked.
试着用sudo gem安装rmagick在Mountain Lion上安装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 个解决方案
#1
20
This worked for me...
这工作对我来说…
As stated on earlier answers:
如先前回答所述:
$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source
I got the magicwand.sh :
我得到了magicwand。承宪:
$ mdfind MagickWand.h -->
/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/wand/MagickWand.h
I then took out the whole path except the actual filename and added C_INCLUDE_PATH= eg:
然后我取出了整个路径,除了实际的文件名,并添加了C_INCLUDE_PATH= eg:
/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/wand/
--->
C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/
I then looked for MagickCore.pc
然后,我去找了MagickCore.pc。
$ mdfind MagickCore.pc
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/MagickCore.pc
The same for this as before:
与以前一样:
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/
--->
PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/
I then used these two paths with gem install:
然后我用这两条路径安装gem:
$ 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
And it finally worked after hours of research. Hope it helps someone.
经过几个小时的研究,它终于奏效了。希望它能帮助一些人。
#2
17
Reinstall imagemagick with Homebrew:
重新安装imagemagick自制程序:
brew remove imagemagick
brew install imagemagick --disable-openmp --build-from-source
Or you can install using this shell script::
或者您可以使用这个shell脚本进行安装:
https://github.com/maddox/magick-installer
#3
7
I've been struggling with this Rmagick on Mountain Lion installation issue for a while, and tried MANY different solutions, and this is the one that finally did the trick for me :
我花了一段时间在这个关于山狮的安装问题上绞尽脑汁,尝试了很多不同的解决方案,这就是最终让我成功的方法:
Reinstall imagemagick with Homebrew:
重新安装imagemagick自制程序:
$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source
and then
然后
$ gem install rmagick -v '2.13.2'
Thank you to Andrew Nesbitt and Phillipe Gustavo for posting and editing this solution !
感谢Andrew Nesbitt和Phillipe Gustavo发布和编辑这个解决方案!
#4
1
The following solved it for me:
以下为我解决了这个问题:
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'
source: http://winstonyw.com/2013/03/21/installing-imagemagick-and-rmagick/
来源:http://winstonyw.com/2013/03/21/installing-imagemagick-and-rmagick/
#1
20
This worked for me...
这工作对我来说…
As stated on earlier answers:
如先前回答所述:
$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source
I got the magicwand.sh :
我得到了magicwand。承宪:
$ mdfind MagickWand.h -->
/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/wand/MagickWand.h
I then took out the whole path except the actual filename and added C_INCLUDE_PATH= eg:
然后我取出了整个路径,除了实际的文件名,并添加了C_INCLUDE_PATH= eg:
/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/wand/
--->
C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/include/ImageMagick/
I then looked for MagickCore.pc
然后,我去找了MagickCore.pc。
$ mdfind MagickCore.pc
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/MagickCore.pc
The same for this as before:
与以前一样:
/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/
--->
PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.0-10/lib/pkgconfig/
I then used these two paths with gem install:
然后我用这两条路径安装gem:
$ 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
And it finally worked after hours of research. Hope it helps someone.
经过几个小时的研究,它终于奏效了。希望它能帮助一些人。
#2
17
Reinstall imagemagick with Homebrew:
重新安装imagemagick自制程序:
brew remove imagemagick
brew install imagemagick --disable-openmp --build-from-source
Or you can install using this shell script::
或者您可以使用这个shell脚本进行安装:
https://github.com/maddox/magick-installer
#3
7
I've been struggling with this Rmagick on Mountain Lion installation issue for a while, and tried MANY different solutions, and this is the one that finally did the trick for me :
我花了一段时间在这个关于山狮的安装问题上绞尽脑汁,尝试了很多不同的解决方案,这就是最终让我成功的方法:
Reinstall imagemagick with Homebrew:
重新安装imagemagick自制程序:
$ brew remove imagemagick
$ brew install imagemagick --disable-openmp --build-from-source
and then
然后
$ gem install rmagick -v '2.13.2'
Thank you to Andrew Nesbitt and Phillipe Gustavo for posting and editing this solution !
感谢Andrew Nesbitt和Phillipe Gustavo发布和编辑这个解决方案!
#4
1
The following solved it for me:
以下为我解决了这个问题:
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'
source: http://winstonyw.com/2013/03/21/installing-imagemagick-and-rmagick/
来源:http://winstonyw.com/2013/03/21/installing-imagemagick-and-rmagick/