无法安装最新的libxml-ruby gem

时间:2017-01-17 22:50:34

标签: ruby rubygems libxml2 libxml-ruby

我无法为ruby 2.3.3安装最新的libxml-ruby gem。这是我得到的错误:

ERROR:  Error installing libxml-ruby:
    ERROR: Failed to build gem native extension.

current directory: C:/Ruby-2.3.3/lib/ruby/gems/2.3.0/gems/libxml-ruby-2.9.0/ext/libxml
C:/Ruby-2.3.3/bin/ruby.exe -r ./siteconf20170117-6916-4mgpq6.rb extconf.rb
checking for libxml/xmlversion.h in /opt/include/libxml2,/opt/local/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
checking for xmlParseDoc() in -lxml2... 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=C:/Ruby-2.3.3/bin/$(RUBY_BASE_NAME)
    --with-xml2-config
    --without-xml2-config
    --with-xml2-dir
    --without-xml2-dir
    --with-xml2-include
    --without-xml2-include=${xml2-dir}/include
    --with-xml2-lib
    --without-xml2-lib=${xml2-dir}/lib
    --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


To see why this extension failed to compile, please check the mkmf.log which can be found here:

我在寻找解决方案时发现了类似的问题,但没有解决问题。有没有人能解决这个问题?

0 个答案:

没有答案
相关问题