Nokogiri说Libxml2的版本高于2.9.0已被打破,是吗?

时间:2014-10-29 15:58:26

标签: ruby nokogiri libxml2

安装上的消息是这样说的,但我找不到任何引用。 “目前 已知 会被破坏”,但已知由谁,以及 的问题是什么?我检查过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.

1 个答案:

答案 0 :(得分:1)

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

gem install nokogiri -- --use-system-libraries 
  1. 可能是grep问题,表示here,你可能可以通过shell命令克服它(假设使用Bash):
  2. export GREP_OPTIONS="--color=auto"