安装 RMagick gem -- 找不到 MagickWand.h [英] Installing RMagick gem -- Can't find MagickWand.h

查看:59
本文介绍了安装 RMagick gem -- 找不到 MagickWand.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 OSX 10.6.8 上安装 rmagick gem,使用 gem install rmagick,但出现以下错误

I am installing the rmagick gem on OSX 10.6.8, using gem install rmagick, and I am getting the following error

    Can't install RMagick 2.13.1. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/bin/ruby


Gem files will remain installed in /Users/disaacs/.rvm/gems/ruby-1.9.3-p125/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/disaacs/.rvm/gems/ruby-1.9.3-p125/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

查看我看到的 mkmf.log 文件

Looking in the mkmf.log file I see

have_header: checking for wand/MagickWand.h... -------------------- no

"/usr/bin/gcc-4.2 -E -I/Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1/x86_64-darwin10.8.0 -I/Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1/ruby/backward -I/Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1 -I.      conftest.c -o conftest.i"
conftest.c:3:29: error: wand/MagickWand.h: No such file or directory

这是真的.在 gcc-4.2 命令的 -I 指令指定的任何目录中都找不到文件 MagickWand.h.为什么不呢?我该如何解决这个问题?

It's true. The file MagickWand.h is not found in any of the directories specific by the -I directives of the gcc-4.2 command. Why not? And how can I fix this?

ImageMagick 已安装,使用自制软件.如果我搜索我的驱动器,我会发现 MagicWand.h 安装在 /usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/wand/MagickWand.h.

ImageMagick is installed, using homebrew. If I search my drive I find MagicWand.h installed in /usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/wand/MagickWand.h.

我已经尝试了 中的所有建议不安装 RMagick 2.13.1.找不到 MagickWand.h.,但都没有找到.

I've tried all the suggestions in Can't install RMagick 2.13.1. Can't find MagickWand.h., but none of them have worked.

编辑:另一件要注意的事情:我最初使用 MacPorts 安装了 ImagMagick 6.7.0-7,而 RMagick 安装得很好.除了它不适用于 CarrierWave gem.所以我卸载了 MacPorts 并卸载了 RMagick.然后使用 brew install -f imagemagick --disable-openmp 重新安装 ImageMagick,并尝试重新安装 rmagick gem(这让我遇到了当前的问题).我在每一步都重新启动了所有终端,以确保我的路径被刷新.

Edit: Another thing to note: I originally had ImagMagick 6.7.0-7 installed using MacPorts, and RMagick installed just fine. Except that it would not work with the CarrierWave gem. So I uninstalled MacPorts and uninstalled RMagick. Then reinstalled ImageMagick using brew install -f imagemagick --disable-openmp, and attempted to reinstall the rmagick gem (which brings me to my current problem). I restarted all terminals at each step, to ensure that my paths were refreshed.

推荐答案

原来答案在 无法安装 RMagick 2.13.1.毕竟找不到 MagickWand.h..我刚刚错误地遵循了建议.

Turns out the answer was in Can't install RMagick 2.13.1. Can't find MagickWand.h. after all. I had just followed the suggestion incorrectly.

C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick gem install rmagick

这样就成功安装了 rmagick gem.

This installed rmagick gem successfully.

不幸的是,rmagic 仍然不能与 CarrierWave 一起使用 :-(,但这完全是一个不同的问题.

Unfortunately, rmagic is still not working with CarrierWave :-(, but that is a different problem altogether.

这篇关于安装 RMagick gem -- 找不到 MagickWand.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆