Installing on Windows

已查看 47 次
跳至第一个未读帖子

Stanimir Stamenkov

未读,
2016年6月19日 16:50:512016/6/19
收件人 libxml...@googlegroups.com
I would really like to get libxml-ruby installed and running on Windows.
I've done quite a few searches on the Web, and I've found mostly
outdated instructions and solutions which have not worked for me.

I've performed a fresh install of Ruby 2.1.8 (32-bit) from
http://rubyinstaller.org/downloads/ to a "C:\ruby\ruby21" directory, and
then set up DevKit as:

https://github.com/oneclick/rubyinstaller/wiki/Development-Kit#quick-start

(extracted to "C:\ruby\devkit")

With "C:\ruby\ruby21\bin" in the PATH I've tried:

C:\ruby>gem install libxml-ruby
Building native extensions. This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.

C:/ruby/ruby21/bin/ruby.exe extconf.rb
checking for libxml/xmlversion.h in
/opt/include/libxml2,/opt/local/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=C:/ruby/ruby21/bin/ruby
--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
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
C:/ruby/ruby21/lib/ruby/gems/2.1.0/gems/libxml-ruby-2.9.0 for inspection.
Results logged to
C:/ruby/ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/libxml-ruby-2.9.0/gem_make.out

Checking "gem_make.out" the first error I've seen:

conftest.c:5:31: fatal error: libxml/xmlversion.h: No such file or directory

So I've gone ahead, and downloaded:

ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz

Extracted to "C:\ruby\libxml2" and tried:

C:\ruby>gem install libxml-ruby -- --with-xml2-dir=C:\ruby\libxml2
Building native extensions with: '--with-xml2-dir=C:\ruby\libxml2'
This could take a while...
ERROR: Error installing libxml-ruby:
ERROR: Failed to build gem native extension.

C:/ruby/ruby21/bin/ruby.exe extconf.rb --with-xml2-dir=C:\ruby\libxml2
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 ***
[...]

I'm pretty much out of ideas what's wrong at this stage. Could someone
provide working instructions on getting libxml-ruby up and runnning on
Windows, preferably w/o need to install tons of other dependencies?

--
Stanimir
回复全部
回复作者
转发
0 个新帖子