繁体   English   中英

在 ruby 和 rails 中安装 rmagick 时出错

[英]Error in rmagick installation in ruby and rails

大家好,

我是 ROR 的新手。 我正在尝试在我的本地机器上安装 rmagick。 当我每次尝试安装它时出现以下错误:请帮助我解决这种情况。

D:\ruby\bin>gem install rmagick  --platform=ruby -- --with-opt-lib=D:\ruby\Rmmagik\lib --with-opt-include=D:\ruby\Rmmagik\include   Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
ERROR: Failed to build gem native extension.

D:/ruby/bin/ruby.exe extconf.rb --with-opt-lib=D:\ruby\Rmmagik\lib --with-opt-include=D:\ruby\Rmmagik\include
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

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
 --without-opt-dir
 --with-opt-include=${opt-dir}/include
 --with-opt-lib=${opt-dir}/lib
 --with-make-prog
 --without-make-prog
 --srcdir=.
 --curdir
 --ruby=D:/ruby/bin/ruby
Gem files will remain installed in D:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to D:/ruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

提前致谢

苏尔然

您缺少 header 文件。

看起来你在 Windows,对吧?

如果是这样,一个简单的解决方案可能是为 Windows 下载预构建的 ImageMagick 二进制文件。

关联

如果您使用的是 Debian 或 Ubuntu:

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

(编者欢迎补充其他平台的解决方案)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM