Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nokogiri says versions of Libxml2 above 2.9.0 are broken, is it?

The message on installation says so, but I can't find any reference to it. "are currently known to be broken", but known by whom, and what is the problem? I've checked the Nokogiri code base and issue log, but I can't find the reference to this.

Here's the (relevant parts of the) message Nokogiri (v1.6.3.1 in this case) gives:

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.
like image 235
ian Avatar asked Oct 29 '14 15:10

ian


1 Answers

There might be two ways: 1. use system libraries as it indicate:

gem install nokogiri -- --use-system-libraries 
  1. it might be grep problem, indicated here, and you might be able to get over it by a shell command (assuming using Bash):

export GREP_OPTIONS="--color=auto"

like image 193
xjlin0 Avatar answered Oct 13 '22 22:10

xjlin0