2013-12-11 167 views
0

我找不出安裝rmagick的問題。gem install rmagick break

看來,我把所有的依賴關係:

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企業服務器11(x86_64的) VERSION = 11 PATCHLEVEL = 2

回答

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 

然後我happly安裝rmagick