将 nokogiri gem 升级到 v1.5.2 时出现问题,libxml2 已过期

将 nokogiri gem 升级到 v1.5.2 时出现问题,libxml2 已过期

我正在尝试安装较新版本的 nokogiri gem(从 1.4.3.1 升级到 1.5.2)。

我得到的输出如下所示:

[~]# gem install nokogiri -v '1.5.2' 
Building native extensions.  This could take a while... 
ERROR:  Error installing nokogiri: 
        ERROR: Failed to build gem native extension. 

        /path/to/rvm/rubies/ruby-1.8.7-p352/bin/ruby extconf.rb 
checking for libxml/parser.h... yes 
checking for libxslt/xslt.h... yes 
checking for libexslt/exslt.h... yes 
checking for iconv_open() in iconv.h... yes 
checking for xmlParseDoc() in -lxml2... yes 
checking for xsltParseStylesheetDoc() in -lxslt... yes 
checking for exsltFuncRegister() in -lexslt... yes 
checking for xmlHasFeature()... no 
----- 
The function 'xmlHasFeature' is missing from your installation of libxml2.
Likely this means that your installed version of libxml2 is old enough that
nokogiri will not work well.  To get around this problem, please upgrade your    
installati on of libxml2. 

这是带有 RPM v4.3.3 的 RedHat 机器,我假设 libxml2 需要更新。看起来当前版本是:

MODULE_VERSION="xml2-2.6.16"

但是我不熟悉升级命令/过程是什么样的,你能帮忙吗?

相关内容