安装rmagick gem时出错

时间:2015-03-17 11:58:17

标签: ruby-on-rails rmagick

我在Ubuntu 14.04操作系统中安装gem rmagick但是我收到了错误,

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

/home/jignesh/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150317-9073-18x8ncb.rb extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.4. 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
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/jignesh/.rvm/rubies/ruby-2.1.5/bin/ruby

extconf failed, exit code 1

我在Stackoverflow以及其他网站上尝试过这么多解决方案,但没有人为我工作。

所以请任何人提供我的解决方案。 提前谢谢。

1 个答案:

答案 0 :(得分:1)

您应该安装magickwand包来解决此问题:

sudo apt-get install libmagickwand-dev