ruby-on-rails – 如何在os x 10.8.3上安装rmagic 2.12.2
发布时间:2020-12-17 02:04:19 所属栏目:百科 来源:网络整理
导读:我正在尝试将机车宝石安装到我的rails应用程序中.它依赖于使用rmagick gem 2.12.2 我成功安装了最新版本的rmagic 2.13.2,但很明显,宝石需要的旧版本有一些路径问题,我安装的imagemagick女巫是版本6.8.0-10 我已经阅读了很多帖子都说要设置不同的环境路径,使
我正在尝试将机车宝石安装到我的rails应用程序中.它依赖于使用rmagick gem 2.12.2
我成功安装了最新版本的rmagic 2.13.2,但很明显,宝石需要的旧版本有一些路径问题,我安装的imagemagick女巫是版本6.8.0-10 我已经阅读了很多帖子都说要设置不同的环境路径,使用brew和bla bla bla重新安装imagemagic.主要问题是rmagic版本,它依赖于imagemagick的位置和版本 我从gem安装中获得的当前错误如下. ERROR: Error installing rmagick: ERROR: Failed to build gem native extension. /Users/mwallace/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb checking for Ruby version >= 1.8.5... yes extconf.rb:107: Use RbConfig instead of obsolete and deprecated Config. checking for clang... yes checking for Magick-config... yes checking for ImageMagick version >= 6.3.5... 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 Can't install RMagick 2.12.2. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information. *** 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/mwallace/.rvm/rubies/ruby-1.9.3-p362/bin/ruby --with-MagickCorelib --without-MagickCorelib --with-Magicklib --without-Magicklib 解决方法
我自己就碰到了这个.问题是rmagick 2.12.2与ImageMagick 6.8或更高版本不兼容.从rmagick 2.13.2的更改日志中:
RMagick 2.13.2 o Fixed issues preventing RMagick from working with version 6.8 or higher o Fixed issues preventing RMagick from working with ruby 1.9.3 如果你必须有旧版本的rmagick,那么你必须降级ImageMagick.在我的情况下,我只有四行代码进行一些简单的图像大小调整和格式转换,所以我从rmagick切换到image_magick.它还使用ImageMagick库,因此它具有相同的功能,但它是库周围的纯ruby包装器,所以它似乎适用于ImageMagick 6.4和6.8之间的任何东西,可能还有更大范围的版本. API与rmagick非常相似,但不完全相同. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |