在设置我的活动商人git时,我一直在努力解决安装libxml-ruby时出现的错误。我已经搜索了很多次错误的所有组件,但我只是不太确定我在看什么。有一堆“不”-有人知道怎么解释我可能错过了什么吗?
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.
/Users/tommynicholas/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... no
checking for atan() in -lm... yes
checking for inflate() in -lz... yes
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... yes
checking for libxml/xmlversion.h... no
checking for libxml/xmlversion.h in /opt/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/tommynicholas/.rvm/rubies/ruby-2.1.1/bin/ruby
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-socketlib
--without-socketlib
--with-nsllib
--without-nsllib
--with-mlib
--without-mlib
--with-zlib
--without-zlib
--with-iconvlib
--without-iconvlib
--with-xml2-config
--without-xml2-config
--with-xml2lib
--without-xml2lib
extconf failure: need libxml2.
Install the library or try one of the following options to extconf.rb:
--with-xml2-config=/path/to/xml2-config
--with-xml2-dir=/path/to/libxml2
--with-xml2-lib=/path/to/libxml2/lib
--with-xml2-include=/path/to/libxml2/include
extconf failed, exit code 1
Gem files will remain installed in /Users/tommynicholas/.rvm/rubies/ruby- 2.1.1/lib/ruby/gems/2.1.0/gems/libxml-ruby-2.7.0 for inspection.
Results logged to /Users/tommynicholas/.rvm/rubies/ruby- 2.1.1/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0/libxml-ruby-2.7.0/gem_make.out发布于 2014-03-09 19:01:57
检查/opt/include/libxml 2、/usr/local/include/libxml 2、/usr/include/libxml 2中的libxml/xmlversion.h .不是
告诉我你可能想念libxml2
试着安装它:
sudo apt-get install libxml2-dev那么,正如TommyNicholas所要求的,我将尝试解释为什么我会放大所有其他的libxml2 --这是一种直觉,但我有一些线索:
/opt/include/、/usr/local/include/和usr/include/下搜索了/opt/include/、/usr/local/include/和usr/include/,没有找到它,因此它没有安装是合理的。Nokogiri时也会发生类似的错误,因此尝试相同的解决方案并不会有什么害处。mkmg.log。有关更多细节,请查看mkmf.log文件。
https://stackoverflow.com/questions/22285905
复制相似问题