【问题标题】:Nokogiri says versions of Libxml2 above 2.9.0 are broken, is it?Nokogiri 说 2.9.0 以上的 Libxml2 版本已损坏,是吗?
【发布时间】:2014-10-29 15:58:25
【问题描述】:

安装消息是这样说的,但我找不到任何参考。 “目前已知会被破坏”,但知道是谁,以及问题是什么?我检查了 Nokogiri 代码库和问题日志,但找不到对此的引用。

这是 Nokogiri(本例中为 v1.6.3.1)给出的(相关部分)消息:

IMPORTANT!  Nokogiri builds and uses a packaged version of libxml2.

If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:

    gem install nokogiri -- --use-system-libraries

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

However, note that nokogiri does not necessarily support all versions
of libxml2.

For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.

【问题讨论】:

  • XPath 优化bug 可能是this issue。这是我的错,但它是fixed in the current 2.9.2 release
  • @nwellnhof 感谢您承担这样的责任,并感谢您提供的信息。谜团 33% 解开!现在找出“兼容性问题”是什么,以及为什么 known 如此难以know:- )
  • 大家好,我正在使用优胜美地,这发生在我身上。有什么帮助???
  • @olleh 会不会和this issue 有关?

标签: ruby nokogiri libxml2


【解决方案1】:

可能有两种方式: 1. 使用系统库:

gem install nokogiri -- --use-system-libraries 
  1. 可能是 grep 问题,表示为 here,您可能可以通过 shell 命令解决它(假设使用 Bash):

export GREP_OPTIONS="--color=auto"

【讨论】:

  • 这没有回答问题,所以我不能给它打勾,但它可能对其他人有帮助,所以最好把它留在这里。
猜你喜欢
  • 2017-02-06
  • 1970-01-01
  • 2014-01-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-06-28
  • 2011-10-29
相关资源
最近更新 更多