Rails 3.2 + Fedora 15:无法安装rmagick

时间:2013-01-05 04:42:16

标签: ruby-on-rails

在过去的几天里,我一直试图在我的fedora 15机器上安装rmmagik gem,但没有运气。这是我经过无数论坛和线程后到目前为止所做的工作。

百胜安装imagemagick 百胜安装imagemagick-devel gem install rmagik

此时我得到了像

这样的错误
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

        /usr/bin/ruby 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 HDRI disabled version of ImageMagick... yes
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
checking for InitializeMagick() in -lMagick++... no
Can't install RMagick 2.13.1. 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
    --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=/usr/bin/ruby
    --with-MagickCorelib
    --without-MagickCorelib
    --with-Magicklib
    --without-Magicklib
    --with-Magick++lib
    --without-Magick++lib


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

在此之后,我尝试从源代码安装ImageMagik。 但安装rmagik时出现相同的错误。 请帮忙。

哦,BTW我一直在尝试设置RubyMine IDE。

2 个答案:

答案 0 :(得分:0)

我在几天前遇到了同样的问题,尽管在OSX上,这里是post and solution

答案 1 :(得分:0)

好的,我在正确设置LD_LIBRARY_PATH env变量后运行它。

export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib

然后使用“yum”安装ImageMagick和Imagemagick-devel软件包。 现在rubyMine启动并运行:-D