我試圖設置一個新的Redhat VM來運行我的Redhat Ruby on Rails應用程序。Nokogiri在Redhat虛擬機上安裝失敗
我想bundle install
,它不工作。它一直告訴我要安裝Nokogiri,但我確實安裝了它,但仍然出現錯誤。
這是我如何安裝引入nokogiri
$ sudo gem install nokogiri -v 1.5.11
Building native extensions. This could take a while...
Successfully installed nokogiri-1.5.11
1 gem installed
然後,在我的Rails應用程序我做bundle install
,我得到這個錯誤:
Installing nokogiri (1.5.11)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
checking for libxml/parser.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/gsidevas/.rvm/rubies/ruby-1.9.3-p448/bin/ruby
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-libxslt-config
--without-libxslt-config
--with-pkg-config
--without-pkg-config
--with-libxml-2.0-config
--without-libxml-2.0-config
--with-libiconv-config
--without-libiconv-config
/home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:970:in `block in find_header'
from /home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /home/gsidevas/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/mkmf.rb:969:in `find_header'
from extconf.rb:116:in `<main>'
Gem files will remain installed in /home/gsidevas/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.5.11 for inspection.
Results logged to /home/gsidevas/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.5.11/ext/nokogiri/gem_make.out
An error occurred while installing nokogiri (1.5.11), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.5.11'` succeeds before bundling.
的思考?
哪裏這是mkmf.log? – jrock2004 2014-10-01 12:27:28