我正在尝试设置一个有点过时的Rails应用程序,所以我可以尝试更新它一点但我似乎无法让bundle install工作。它一直告诉我:
An error occurred while installing libxml-ruby (2.2.2), and Bundler cannot continue.
Make sure that `gem install libxml-ruby -v '2.2.2'` succeeds before bundling.
整个错误是:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/camillavk/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150122-7039-3vyx6p.rb extconf.rb
extconf.rb:17:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
extconf.rb:17:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... yes
checking for atan() in -lm... yes
checking for inflate() in -lz... yes
checking for iconv_open() in -liconv... no
checking for libiconv_open() in -liconv... no
checking for libiconv_open() in -llibiconv... no
checking for iconv_open() in -llibiconv... no
checking for iconv_open() in -lc... yes
checking for xmlParseDoc() in -lxml2... yes
checking for libxml/xmlversion.h... no
checking for libxml/xmlversion.h in /opt/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
creating extconf.h
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling ruby_xml_html_parser_options.c
compiling ruby_xml_cbg.c
compiling ruby_xml_html_parser.c
compiling ruby_xml_relaxng.c
compiling ruby_xml_schema.c
compiling ruby_xml_xpath_expression.c
compiling ruby_xml_parser.c
compiling ruby_xml_io.c
compiling ruby_xml_error.c
compiling ruby_xml_html_parser_context.c
ruby_xml_html_parser_context.c: In function ‘rxml_html_parser_context_options_set’:
ruby_xml_html_parser_context.c:307:7: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
int result;
^
compiling ruby_xml_node.c
ruby_xml_node.c: In function ‘rxml_node_to_s’:
ruby_xml_node.c:585:54: error: dereferencing pointer to incomplete type
result = rxml_new_cstr((const char*) output->conv->content, xencoding);
^
ruby_xml_node.c:587:56: error: dereferencing pointer to incomplete type
result = rxml_new_cstr((const char*) output->buffer->content, xencoding);
^
make: *** [ruby_xml_node.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/camillavk/.rvm/gems/ruby-2.1.5/gems/libxml-ruby-2.2.2 for inspection.
Results logged to /home/camillavk/.rvm/gems/ruby-2.1.5/extensions/x86_64-linux/2.1.0/libxml-ruby-2.2.2/gem_make.out
An error occurred while installing libxml-ruby (2.2.2), and Bundler cannot continue.
Make sure that `gem install libxml-ruby -v '2.2.2'` succeeds before bundling.
当我尝试安装libxml-ruby时,它说;
gem install libxml-ruby *[master][ruby-2.1.5]
Building native extensions. This could take a while...
Successfully installed libxml-ruby-2.8.0
1 gem installed
但是当我使用bundle install时会再次出现同样的错误...
当我尝试
时gem install libxml-ruby -v '2.2.2'
我收到此错误:
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
/home/camillavk/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150122-7254-1rcd0x0.rb extconf.rb
extconf.rb:17:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
extconf.rb:17:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... yes
checking for atan() in -lm... yes
checking for inflate() in -lz... yes
checking for iconv_open() in -liconv... no
checking for libiconv_open() in -liconv... no
checking for libiconv_open() in -llibiconv... no
checking for iconv_open() in -llibiconv... no
checking for iconv_open() in -lc... yes
checking for xmlParseDoc() in -lxml2... yes
checking for libxml/xmlversion.h... no
checking for libxml/xmlversion.h in /opt/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
creating extconf.h
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling ruby_xml_html_parser_options.c
compiling ruby_xml_cbg.c
compiling ruby_xml_html_parser.c
compiling ruby_xml_relaxng.c
compiling ruby_xml_schema.c
compiling ruby_xml_xpath_expression.c
compiling ruby_xml_parser.c
compiling ruby_xml_io.c
compiling ruby_xml_error.c
compiling ruby_xml_html_parser_context.c
ruby_xml_html_parser_context.c: In function ‘rxml_html_parser_context_options_set’:
ruby_xml_html_parser_context.c:307:7: warning: variable ‘result’ set but not used [-Wunused-but-set-variable]
int result;
^
compiling ruby_xml_node.c
ruby_xml_node.c: In function ‘rxml_node_to_s’:
ruby_xml_node.c:585:54: error: dereferencing pointer to incomplete type
result = rxml_new_cstr((const char*) output->conv->content, xencoding);
^
ruby_xml_node.c:587:56: error: dereferencing pointer to incomplete type
result = rxml_new_cstr((const char*) output->buffer->content, xencoding);
^
make: *** [ruby_xml_node.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/camillavk/.rvm/gems/ruby-2.1.5/gems/libxml-ruby-2.2.2 for inspection.
Results logged to /home/camillavk/.rvm/gems/ruby-2.1.5/extensions/x86_64-linux/2.1.0/libxml-ruby-2.2.2/gem_make.out
我在linux上运行它 - &gt;有没有人知道如何解决这个问题或修复它?
由于