本文介绍了在Linux上,我该如何解决警告:Nokogiri是针对LibXML版本2.8.0构建的,但已动态加载2.9.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mac用户,请参阅: Mac用户并得到警告:Nokogiri是针对LibXML 2.7.8版构建的,但已动态加载2.7.3

Mac users, see:Mac user and getting WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.7.3

我正在使用linux(openSUSE 12.3)并运行nokogiri -v显示:

I'm using linux (openSUSE 12.3) and running nokogiri -v shows:

WARNING: Nokogiri was built against LibXML version 2.8.0, but  dynamically loaded 2.9.0
# Nokogiri (1.6.0)
---
warnings:
- Nokogiri was built against LibXML version 2.8.0, but  dynamically loaded 2.9.0
nokogiri: 1.6.0
ruby:
  version: 2.0.0
  platform: x86_64-linux
  description: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]
  engine: ruby
libxml:
  binding: extension
  source: packaged
  libxml2_path: /home/william/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/x86_64-suse-linux/libxml2/2.8.0
  libxslt_path: /home/william/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/ports/x86_64-suse-linux/libxslt/1.1.26
  compiled: 2.8.0
  loaded: 2.9.0

推荐答案

此处的隐式问题似乎是为什么收到此警告,对此我该怎么办?"

The implicit question here seems to be "why am I getting this warning, and what can I do about it?"

您会收到警告,因为Nokogiri是针对LibXML 2.8.0版构建的(它是一个本机扩展的gem,需要编译),并且您的系统此后已将LibXML升级到2.9.0版.

You are getting the warning because Nokogiri was built (it is a largely native-extension gem, requiring compilation) against LibXML version 2.8.0, and your system has since upgraded LibXML to version 2.9.0.

这是一个警告,并非有错误-在许多情况下,Nokogiri可以继续使用比其所针对的新版本LibXML更好的工作.

This is a warning, not at error -- in many cases, Nokogiri will continue to work fine with a newer version of LibXML than it was built against.

如果您遇到问题或只是为了安全起见,重建Nokogiri将解决此问题-将根据当前安装的LibXML版本进行构建.

If you run into problems or just want to be on the safe side, rebuilding Nokogiri will solve the issue -- it will be built against the version of LibXML currently installed.

这篇关于在Linux上,我该如何解决警告:Nokogiri是针对LibXML版本2.8.0构建的,但已动态加载2.9.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 22:05