在 Snow Leopard 上安装 RMagick 时遇到问题
每当我尝试使用 sudo gem install rmagick 安装 rmagick gem 时,当它尝试包含名为 wand/MagicWand.h 的头文件时,安装会失败。
日志文件中的确切错误是:
gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -I$MAGICK_HOME/include/ImageMagick -I/include/ImageMagick -fopenmp conftest.c -o conftest.i"
conftest.c:1:29: error: wand/MagickWand.h: No such file or directory
checked program was:
/* begin */
1: #include <wand/MagickWand.h>
/* end */
$MAGICK_HOME env 变量设置为 /usr/bin/imagemagick
它正在查找的头文件位于 /usr/bin/imagemagick/include/ImageMagick/wand/MagickWand.h
我试图按照找到的说明进行操作 此处。我将其安装在运行 Snow Leopard 的 Intel iMac 上。
Whenever I try to install the rmagick gem using sudo gem install rmagick the install fails when it tries to include a header file called wand/MagicWand.h
The exact error from the log file is:
gcc -E -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -I$MAGICK_HOME/include/ImageMagick -I/include/ImageMagick -fopenmp conftest.c -o conftest.i"
conftest.c:1:29: error: wand/MagickWand.h: No such file or directory
checked program was:
/* begin */
1: #include <wand/MagickWand.h>
/* end */
The $MAGICK_HOME env variable is set to /usr/bin/imagemagick
The header file it is looking for is located in /usr/bin/imagemagick/include/ImageMagick/wand/MagickWand.h
I was trying to follow the instructions found here. I am installing this on an Intel iMac running Snow Leopard.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
另一种方法是使用 Brew 而不是 macports。这里有关于如何安装brew的信息,然后您可以使用命令
brew install imagemagick
来安装imagemagick。阅读 wiki 以了解如何清除 macport 安装。An alternative approach is to use Brew instead of macports. There is information on how to install brew and then you can install imagemagick by using the command
brew install imagemagick
. Read the wiki to see how to clear out macport installations.