imagemagick - 检查 ImageMagick 版本 >= 6.4.9... 否 无法安装 RMagick 2.13.4。您必须有 ImageMagick 6.4.9 或更高版本

标签 imagemagick rmagick

我在安装 rmagick 时遇到问题。我正在使用 ruby​​ on rails 框架开发我的项目。我在我的 gemfile 中包含了 rmagick gem。我收到以下错误消息:

checking for ImageMagick version >= 6.4.9... no
Can't install RMagick 2.13.4. You must have ImageMagick 6.4.9 or later.

我已经使用 brew 安装了 imagemagick:
 imagemagick-6.8.9-8 already installed

imagemagick 文件夹位于/usr/local/Cellar 目录中

在我的终端中:

Zoulfias-iMac:Myapp zoulfiahall$ rvm 使用 ruby​​-2.0.0-p481
Using /Users/zoulfiahall/.rvm/gems/ruby-2.0.0-p481
Zoulfias-iMac:Myapp zoulfiahall$ sudo gem install rmagick

Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
ERROR: Failed to build gem native extension.

/Users/zoulfiahall/.rvm/rubies/ruby-2.0.0-p481/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for /usr/bin/clang... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... no
Can't install RMagick 2.13.4. You must have ImageMagick 6.4.9 or later.

*** 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
--without-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/zoulfiahall/.rvm/rubies/ruby-2.0.0-p481/bin/ruby

extconf failed, exit code 1

Gem files will remain installed in /Users/zoulfiahall/.rvm/rubies/
ruby-2.0.0-  p481/lib/ruby/gems/2.0.0/gems/rmagick-2.13.4 for inspection.
Results logged to /Users/zoulfiahall/.rvm/rubies/
ruby-2.0.0-  p481/lib/ruby/gems/2.0.0/extensions/x86_64-darwin-13/
2.0.0-static/rmagick-2.13.4/gem_make.out

任何建议将被认真考虑。

最佳答案

这在 ubuntu 上对我有用。

$ sudo apt-get install imagemagick
$ sudo apt-get install libmagickwand-dev

现在再试一次。
$ bundle install

关于imagemagick - 检查 ImageMagick 版本 >= 6.4.9... 否 无法安装 RMagick 2.13.4。您必须有 ImageMagick 6.4.9 或更高版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27640087/

相关文章:

Imagemagick:平铺动画 gif

c - MagicWand 用于 C : Lack of documentation means more errors for me

perl - 如何将各种尺寸的 TIFF 文件转换为页面尺寸 8.5″×11″ 的统一尺寸 PDF 文件而不损失质量?

ruby - Rails + Carrierwave + RMagick : Crop only if image is large

ruby-on-rails - 在 windows 7 上安装 RMagick 错误以使用 Ruby on rails 创建图像

go - 如何在 Go 语言中创建优化和渐进式图像(JPG、PNG)

bash - 我想使用终端中的转换命令删除白色背景,并且图像不在彩色像素之外

ruby - 使用 RMagick 读取图像时设置密度

ruby - 如何使用 ruby​​ 将多个图像组合成一个 PDF?

ruby - 使用 Rmagick 和 FFmpeg 实现图片缩放效果