The full error:
savis@freeman:~$ vagrant plugin install vagrant-aws vagrant-aws-winrm vagrant-reload
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Building native extensions. This could take a while...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
ERROR: Failed to build gem native extension.
current directory: C:/Users/savis/.vagrant.d/gems/2.4.2/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
C:/HashiCorp/Vagrant/embedded/mingw64/bin/ruby.exe -r ./siteconf20180421-8644-17edwfl.rb extconf.rb
checking for xml2-config... 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:/HashiCorp/Vagrant/embedded/mingw64/bin/$(RUBY_BASE_NAME)
--with-libxml2-config
--without-libxml2-config
--with-pkg-config
--without-pkg-config
extconf.rb:29:in `<main>': The "libxml2" package isn't available. (RuntimeError)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Users/savis/.vagrant.d/gems/2.4.2/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.2.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Users/savis/.vagrant.d/gems/2.4.2/gems/ovirt-engine-sdk-4.2.4 for inspection.
Results logged to C:/Users/savis/.vagrant.d/gems/2.4.2/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.2.4/gem_make.out
- Vagrant 2.0.4
- Windows 10 x64
- Cygwin
- Set
NOKOGIRI_USE_SYSTEM_LIBRARIES=1
in Cygwin (usingexport
command) - Set the variable in system environment variables.
- Set the variable to
true
instead of1
.
Solutions described in mitchellh/vagrant-aws#539
- Renamed the files
ruby
andrubyw
packaged within Vagrant, to smething else. - Installed latest version of Ruby with Devkit, from https://rubyinstaller.org/downloads/ (v2.5.1-1)
The
extconf.rb
file searches for an executablexml2-config
which is not present for Windows. It gets installed by thelibxml2-devel
package.Now, it is available for Cygwin.
So ... Another way out might be to install it on Cygwin?
http://cygwin.com/cgi-bin2/package-cat.cgi?file=x86_64%2Flibxml2-devel%2Flibxml2-devel-2.9.3-1&grep=.pc
UPDATE: It did get installed to Cygwin's
/usr/bin
.But the plugin install still couldn't find the executable. Could it be a problem with PATH?
UPDATE:
The file that gets installed is
xml2-config
(Bash script). Perhapsextconf.rb
knows we are on Windows, and is searching for a .bat script, or a .cmd script, or a .exe file.