ruby – 安装RMagick宝石 – 找不到MagickWand.h
我正在安装rmagick宝石在OSX 10.6.8,使用gem安装rmagick,我收到以下错误
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文件我看到 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.为什么不?我该怎么解决这个问题? ImageMagick已安装,使用自制软件.如果我搜索我的驱动器,我发现MagicWand.h安装在/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/wand/MagickWand.h中. 我已经尝试了所有的建议在Can’t install RMagick 2.13.1. Can’t find MagickWand.h.,但没有一个工作. 编辑: 解决方法
对于基于Debian的(例如Ubuntu)系统,您可以尝试,
sudo apt-get install libmagickcore-dev libmagickwand-dev gem install rmagick 它适用于我 从ruby-forum找到解决方案 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |