ruby 1.8.7 如何安装 libxml-ruby 0.8.3?

发布于 08-27 12:49 字数 1949 浏览 20 评论 0

ruby 版本:1.8.7
OS:Ubuntu12.04

在rails项目下执行安装gemfile的命令

bundle install --path .bundle

得到下面结果

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb 
extconf.rb:6: stack level too deep (SystemStackError)


Gem files will remain installed in /home/username/path/.bundle/ruby/1.9.1/gems/libxml-ruby-0.8.3 for inspection.
Results logged to /home/username/path/.bundle/ruby/1.9.1/gems/libxml-ruby-0.8.3/ext/libxml/gem_make.out

An error occurred while installing libxml-ruby (0.8.3), and Bundler cannot continue.
Make sure that `gem install libxml-ruby -v '0.8.3'` succeeds before bundling.

运行

sudo gem install libxml-ruby -v '0.8.3'

却提示:

Building native extensions.  This could take a while...
Successfully installed libxml-ruby-0.8.3
Installing ri documentation for libxml-ruby-0.8.3

No definition for input_callbacks_add_scheme

No definition for input_callbacks_remove_scheme

No definition for ruby_xml_node2_new_native

Enclosing class/module 'cXMLSaxParser' for module Callbacks not known

No definition for ruby_xml_html_parser_new_file

No definition for ruby_xml_html_parser_new_io

No definition for ruby_xml_html_parser_filename_get

No definition for ruby_xml_html_parser_filename_set

No definition for ruby_xml_html_parser_io_get

No definition for ruby_xml_html_parser_io_set

No definition for ruby_xml_parser_context_options_get

No definition for ruby_xml_parser_context_options_set
/usr/local/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during another chdir block
/usr/local/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during another chdir block
Done installing documentation for libxml-ruby after 2 seconds
1 gem installed

但Gemfile.lock没法正常生成。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文