首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在rhel5上安装nokogiri?

如何在rhel5上安装nokogiri?
EN

Stack Overflow用户
提问于 2013-08-01 15:19:11
回答 1查看 590关注 0票数 0

我想安装gitlab,所以我需要安装一些宝石。因此,我得到以下错误:

代码语言:javascript
复制
Installing nokogiri (1.5.9)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/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()... yes
checking for xmlFirstElementChild()... no
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile

make
compiling xml_processing_instruction.c
In file included from ./xml_processing_instruction.h:4,
                 from xml_processing_instruction.c:1:
./nokogiri.h:13:1: warning: "_GNU_SOURCE" redefined
<command-line>: warning: this is the location of the previous definition
In file included from ./nokogiri.h:103,
                 from ./xml_processing_instruction.h:4,
                 from xml_processing_instruction.c:1:
./xml_sax_parser.h: In function ânokogiriSAXTuple* nokogiri_sax_tuple_new(xmlParserCtxt*, VALUE)â:
./xml_sax_parser.h:29: error: invalid conversion from âvoid*â to ânokogiriSAXTuple*â
xml_processing_instruction.c: At global scope:
xml_processing_instruction.c:10: error: expected unqualified-id before ânewâ
make: *** [xml_processing_instruction.o] Error 1


Gem files will remain installed in /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.5.9 for inspection.
Results logged to /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/nokogiri-1.5.9/ext/nokogiri/gem_make.out
An error occurred while installing nokogiri (1.5.9), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.5.9'` succeeds before bundling.

关于我的系统:RHEL 5.3,GCC44,G++44,Python26,ruby 1.9.3p0,ruby-devel 1.9.1

我已经检查了nokogiri的每个安装指南,但是错误并没有消失:

例如:

代码语言:javascript
复制
sudo gem install nokogiri -- --with-xml2-lib=/usr/local/lib 
                             --with-xml2-include=/usr/local/include/libxml2 
                             --with-xslt-lib=/usr/local/lib 
                             --with-xslt-include=/usr/local/include

我还安装了必要的依赖项: libxml、libxml2-devel、libxml2、libxslt、libxslt.

有谁知道,我怎么能解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2013-08-02 11:10:25

好的,现在我把问题解决如下:

代码语言:javascript
复制
1. libxml2 updated to libxml2-2.7.8
2. libxslt updated to libxslt-1.1.20
3. Again followed this installation guide: 
http://nokogiri.org/tutorials/installing_nokogiri.html

..and这里有关包的来源:http://rpm.eprints.org/RHEL/5/i386/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17998065

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档