RMagick安装:找不到MagickWand.h [英] RMagick installation: Can't find MagickWand.h

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

问题描述

更新 RMagick Imagemagick 是一个痛苦的期待。我已经在我的mac上更新了Imagemagick版本(MacOS El Capitan版本10.11.5),使用自制软件将Ruby 2.3中的一个项目更新为 6.9.5-9

Updating RMagick and Imagemagick is a painful expierence. I have updated the Imagemagick version on my mac (MacOS El Capitan Version 10.11.5) with homebrew for one project in Ruby 2.3 to 6.9.5-9

$ convert --version
Version: ImageMagick 6.9.5-9 Q16 x86_64 2016-09-09

现在,Ruby 1.8.7中的旧项目拒绝使用错误消息这个RMagick的安装是使用ImageMagick 6.8.9配置的但ImageMagick 6.9.5-9正在使用中。因此我卸载了rmagick,但它无法再次安装

Now an older project in Ruby 1.8.7 refuses to work with the error message "this installation of RMagick was configured with ImageMagick 6.8.9 but ImageMagick 6.9.5-9 is in use". Thus I uninstalled "rmagick", but it can not be installed again

$ gem install rmagick -v 2.16.0
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
ERROR: Failed to build gem native extension.

checking for /usr/local/opt/gcc46/bin/gcc-4.6... yes
checking for Magick-config... yes
checking for outdated ImageMagick version (<= 6.4.9)... no
checking for presence of MagickWand API (ImageMagick version >= 6.9.0)... no
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... no
checking for sys/types.h... no
checking for wand/MagickWand.h... no

Can't install RMagick 2.16.0. Can't find MagickWand.h. 

如果无法安装,则无法启动整个应用程序。我尝试了这里的所有答案,并且它们都不适用于MacOS :-(我用自制程序重新安装了imagemagick和pkg-config,并尝试了各种版本的RMagick但没有成功.2.16.0是 RMagick

And if it can not be installed, the whole application can not be started. I tried all the answers from here, and none of them works on MacOS :-( I reinstalled imagemagick and pkg-config with homebrew, and tried various version of RMagick without success. 2.16.0 is the latest version of RMagick currently.

MagicWand似乎在ImageMagick版本> 6.9中使用,它可以在machine:

MagicWand seems to be used in ImageMagick version > 6.9, and it can be found on the machine:

find /usr/local -name MagickWand.h
=> /usr/local/Cellar/imagemagick/6.9.5-9_1/include/ImageMagick-6/wand/MagickWand.h

find /usr/local -name MagickWand.pc
=> /usr/local/Cellar/imagemagick/6.9.5-9_1/lib/pkgconfig/MagickCore.pc

它甚至不起作用如果我在gem安装期间指定这些路径(与上面相同的错误): - (

It does not work even if I specifiy the these paths during the gem install (same error as above) :-(

C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.9.5-9_1/include/ImageMagick-6 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig gem install rmagick

更新:

只有Ruby 1.8.7才会出错,可以为Ruby 2.0和Ruby 2.3安装RMagick。 Ruby 1.8.7和ImageMagick 6.9.5似乎不兼容。

The error only occurs for Ruby 1.8.7, it is possible to install RMagick for Ruby 2.0 and Ruby 2.3. Ruby 1.8.7 and ImageMagick 6.9.5 do not seem to be compatible.


  • Ruby 1.8.7 x

  • Ruby2.0.0✓

  • Ruby2.3.​​1✓

推荐答案

我的系统出现严重错误,非常糟糕,完全没问题,但我终于能够在安装后再次为Ruby 1.8.7安装RMagick

Something was severely wrong on my system, so badly that it was completely f*d up, but I was finally to able to install RMagick for Ruby 1.8.7 again after I installed

使用RVM安装新的Ruby版本 rvm install 1.8.7 还安装了新的GCC编译器:它删除了较旧的GCC版本4.6并安装了GCC版本4.9。显然,尽管pkg-config,GCC仍无法找到合适的标题。

The installation of a new Ruby version with RVM rvm install 1.8.7 also installed a new GCC compiler: it removed an older GCC version 4.6 and installed GCC version 4.9. Apparently GCC was not able to find the right headers despite pkg-config.

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

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