宝石安装rmagick休息

时间:2013-12-11 08:37:14

标签: gem install rmagick

我无法弄清楚安装rmagick的问题是什么。

似乎我拥有所有依赖项:

ERROR:  Error installing rmagick:
ERROR: Failed to build gem native extension.

/home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes

Warning: Found more than one ImageMagick installation. This could cause problems at runtime.
         /usr/bin/Magick-config reports version 6.7.2 Q16 is installed in /usr
         /usr/bin/X11/Magick-config reports version 6.7.2 Q16 is installed in /usr
Using 6.7.2 Q16 from /usr.

checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.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/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
/home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:565:in `try_cpp'
    from /home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:1044:in `block in have_header'
    from /home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
    from /home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
    from /home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:310:in `open'
    from /home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
    from /home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:310:in `open'
    from /home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
    from /home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
    from /home/my-domain/my-user/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:1043:in `have_header'
    from extconf.rb:194:in `<main>'

什么意思是“你必须先安装开发工具。”? 我在SuSE服务器上,这是发布细节:

SUSE Linux Enterprise Server 11(x86_64) 版本= 11 PATCHLEVEL = 2

1 个答案:

答案 0 :(得分:0)

我决定自己删除已安装的ImageMagick并从源代码编译新的:

wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
gunzip -c ImageMagick.tar.gz | tar xvf -
cd ImageMagick-6.x.x
./configure --with-webp=no  #SuSE doens't like it
make; make install

然后我很高兴安装了rmagick