无法安装ruby gem xmlparser

时间:2015-11-11 11:26:05

标签: ruby-on-rails ruby xml ubuntu ubuntu-14.04

我正在尝试安装此gem xmlparser,以便我可以使用类XSD :: QName从XML读取。

它要我安装expatxmlparse,然后在其他几个软件包和尝试之后我遇到了这个新问题:

enter image description here

"无法构建gem原生扩展

在-lsocket中检查ntohl()没有

等等

等等

制作失败,退出代码2"

@edit

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby2.1 extconf.rb
checking for expat.h... yes
checking for XML_ParserCreate() in -lexpat... yes
checking for XML_SetNotStandaloneHandler()... yes
checking for XML_SetParamEntityParsing()... yes
checking for XML_SetDoctypeDeclHandler()... yes
checking for XML_ParserReset()... yes
checking for XML_SetSkippedEntityHandler()... yes
checking for XML_GetFeatureList()... yes
checking for XML_UseForeignDTD()... yes
checking for XML_GetIdAttributeIndex()... yes
checking for ntohl() in -lsocket... no
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling xmlparser.c
xmlparser.c: In function ‘XMLParser_parse’:
xmlparser.c:1783:2: error: format not a string literal and no format arguments [-Werror=format-security]
  rb_raise(eXMLParserError, (char*)errStr);
  ^
xmlparser.c:1832:5: error: format not a string literal and no format arguments [-Werror=format-security]
     rb_raise(eXMLParserError, (char*)errStr);
     ^
cc1: some warnings being treated as errors
Makefile:224: recipe for target 'xmlparser.o' failed
make: *** [xmlparser.o] Error 1

make failed, exit code 2

Gem files will remain installed in /tmp/bundler20151111-18724-f3sw3fxmlparser-0.7.2.1/gems/xmlparser-0.7.2.1 for inspection.
Results logged to /tmp/bundler20151111-18724-f3sw3fxmlparser-0.7.2.1/extensions/x86-linux/2.1.0/xmlparser-0.7.2.1/gem_make.out

0 个答案:

没有答案