这是一个到目前为止谷歌还没有很有帮助的问题:
我正在使用本机扩展的 Linux Mint 上安装 RubyGem,因此它试图在我的机器上编译它们。正如经常发生的那样,它返回一个错误,说明它在机器上没有构建扩展所需的所有工具:
Building native extensions. This could take a while...
ERROR: Error installing sas-helper:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.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
compiling xmlparser.c
xmlparser.c: In function ‘XMLParser_mark’:
xmlparser.c:185:16: warning: variable ‘parent’ set but not used [-Wunused-but-set-variable]
xmlparser.c: In function ‘iterExternalEntityRefHandler’:
xmlparser.c:372:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
xmlparser.c: In function ‘myExternalEntityRefHandler’:
xmlparser.c:832:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
xmlparser.c: In function ‘myStartCdataSectionHandler’:
xmlparser.c:860:14: warning: variable ‘parser’ set but not used [-Wunused-but-set-variable]
xmlparser.c: In function ‘myEndCdataSectionHandler’:
xmlparser.c:868:14: warning: variable ‘parser’ set but not used [-Wunused-but-set-variable]
xmlparser.c: In function ‘myNotStandaloneHandler’:
xmlparser.c:898:14: warning: variable ‘parser’ set but not used [-Wunused-but-set-variable]
xmlparser.c: In function ‘myEndDoctypeDeclHandler’:
xmlparser.c:939:14: warning: variable ‘parser’ set but not used [-Wunused-but-set-variable]
xmlparser.c: In function ‘XMLParser_parse’:
xmlparser.c:1783:2: error: format not a string literal and no format arguments [-Werror=format-security]
xmlparser.c:1832:5: error: format not a string literal and no format arguments [-Werror=format-security]
cc1: some warnings being treated as errors
make: *** [xmlparser.o] Error 1
我查看了谷歌,并没有发现很多与这种情况相关的东西。看来我缺少这个 ntohl() 函数,谁能告诉我在哪个 Debian 软件包中可以找到这个函数?