The "libxml2" package isn't available
svendewindt opened this issue ยท 33 comments
Hi,
When trying trying to install vagrant-aws pluging, the installation fails on this:
extconf.rb:29:in `
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Users/Sven/.vagrant.d/gems/2.4.3/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/Sven/.vagrant.d/gems/2.4.3/gems/ovirt-engine-sdk-4.2.4 for inspection.
Results logged to C:/Users/Sven/.vagrant.d/gems/2.4.3/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.2.4/gem_make.out
The log file:
`find_executable: checking for xml2-config... -------------------- no
"pkg-config --exists libxml2"`
package configuration for libxml2 is not found
I've tried downloading libxml2 and adding it to the path, without succes. What can i do to resolve this?
This is on Windows 10.
Kind regards,
Sven.
experiencing the same issue
+1. On windows 10 with Vagrant 2.0.4
+1 Win10 Vagrant 2.0.4, reinstalled and tried vagrant plugin expunge --reinstall
, no luck
Tried cinst libxslt libiconv -y -Source "https://go.microsoft.com/fwlink/?LinkID=230477"
to install libxml, added the install path to $env:PATH
as well
I ran $env:Path="C:\HashiCorp\Vagrant\embedded\mingw64\bin;$env:Path"
and tried to install again, it seems it's a Windows10 permissions error...
ฮป vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/package.rb:383:in `initialize': Permission denied @ rb_sysopen - C:/Users/<user>/.vagrant.d/gems/2.4.3/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c/extconf.rb (Errno::EACCES)
the ovirtsdk4c
path had no owner, fixed that, ran vagrant plugin expunge --reinstall
and and it installed fine
+1. On windows 10 with Vagrant 2.0.3
tryed vagrant plugin expunge --reinstall
didn't fix the issue for me.
+1. On Windows 10 with Vagrant 2.0.1.
Had this issue with Windows 10, Vagrant 2.0.3. Fixed it by installing Ruby separately (from https://rubyinstaller.org/downloads/) and RENAMING the ruby.exe and rubyw.exe files under C:\hashicorp\vagrant\embedded\mingw64\bin so Vagrant fell back on the new Ruby version. Guess the Ruby version that comes with Vagrant is lite and doesn't come with libxml2 package
There are various issues with the latest packages for the AWS plugin running on Windows, but I am now up and running by doing the following, all of which are workarounds and will need to be changed for your install drives but show the cause of the problem:
- Copy C:\HashiCorp\Vagrant\embedded\mingw64\lib\pkgconfig\libxml-2.0.pc libxml2.pc
This allows the libxml2 package definition to be found (the definition was renamed to libxml-2.0 at some point).
- Create an empty "C:\HashiCorp\Vagrant\embedded\mingw64\x86_64-w64-mingw32\include\sys\select.h"
%VAGRANT_HOME%\gems\2.4.4\gems\ovirt-engine-sdk-4.2.4\ext\ovirtsdk4c\ov_http_client.c attempts to include it but it is not currently installed with the embedded mingw64.
- Move the #define _GETTIMEOFDAY_DEFINED line to before #ifndef _GETTIMEOFDAY_DEFINED in C:\HashiCorp\Vagrant\embedded\mingw64\x86_64-w64-mingw32\include\sys\time.h to prevent the new definition from being parsed.
There is a non-matching redefinition of gettimeofday as indicated by the compiler
- Remove the extra 'io' mapping at the end of %VAGRANT_HOME%\gems\2.4.4\gems\virtualbox-0.8.6\lib\virtualbox\com\ffi\util.rb
Unneeded duplicate mapping.
I hope that helps!
Hi,
the bug/issue still exists for vagrant 2.1.1 :-(
On Windows, both solutions from JudeCole & ChrisLeNeve didn't work.
I am not able to install the vagrant-aws plugin !!!
I was also having an issue with vagrant 2.1.1 on Windows 64-bit.
@judcole 's solution worked for me, but I was confused by step 3 at first.
The code change for moving the _GETTIMEOFDAY_DEFINED definition is to move ONLY the _GETTIMEOFDAY_DEFINED line, not the entire definition:
#define _GETTIMEOFDAY_DEFINED
#ifndef _GETTIMEOFDAY_DEFINED
#define _GETTIMEOFDAY_DEFINED
int __cdecl gettimeofday(struct timeval *__restrict__,
void *__restrict__ /* tzp (unused) */);
#endif
Also, virtual drive V was not defined for me, so I could not determine how to perform step 4, but that did not appear to affect the outcome.
Sorry for the confusion on my step 4 above! To explain further:
-
This fix is actually for an irritating but harmless warning thrown up by the vagrant-virtualbox plugin about a duplicate 'io' case value (Unneeded duplicate mapping).
-
V:\vagrant is the folder where my .vagrant.d folder was installed, but in posting the full path a backslash got lost. It would have been clearer as %VAGRANT_HOME%\gems\2.4.4\gems\virtualbox-0.8.6\lib\virtualbox\com\ffi\util.rb
I have updated my comment to include the environment variable.
HTH
My "solution" for this highly frustrating problem was
- Create an Ubuntu Vagrant box on Windows
vagrant up
the box- Install Vagrant and
vagrant-aws
inside the Vagrant box
Some really great answers posted here, really appreciate the effort from the community. But honestly, it's quite surprising there hasn't been any patch or update released for this blocker bug. It clearly seems to be a breaking change and (for me at least) has completely stalled my work.
Please see #542 for a better option than all of the editing and such shown above.
Hi,
it is working . please do install ruby latest version on windows box. Then run vagrant update.
@arungbinath I am not sure that solution is complete - please provide additional info so other visitors may benefit:
- which ruby version, specifically are you talking about?
vagrant update
is not a command. Do you mean updating the version of Vagrant? If so, which version?- To my knowledge, Vagrant packages its own Ruby. Does your solution involve pointing Vagrant to the system-installed Ruby?
This workaround worked for me:
- Install
fog-ovirt 1.0.1
vagrant plugin install --plugin-version 1.0.1 fog-ovirt
- install vagrant-aws
vagrant plugin install vagrant-aws
fog-ovirt
is one of the dependencies and since version 1.0.2 it depends on ovirt-engine-sdk
which is giving trouble
Thanks @rurku , that worked for me!!!
FWIW, the fog gem was broken out into multiple gems, one per service provider.
The right thing to do here is only install fog-aws, rather than the whole fog suite which installs truly unnecessary dependencies, like libvirt.
See #542 for proper resolution
Thanks @rurku , ur solution worked for me as well thanks a lot, struck for a week !,it worked for me!
@rurku operative!
This is not fixed. It was never fixed here. The workaround described above is not a solution. Either merge #542 or fix this issue directly. It is ridiculous that this was closed without ever actually fixing anything.
Thanks to @rurku (w7, cygwin 2.11.2, Vagrant 2.2.2) this worked for me:
$ vagrant plugin install vagrant-ovirt vagrant-aws
Installed the plugin 'vagrant-ovirt (0.0.2)'!
Installed the plugin 'vagrant-aws (0.3.0)'!
For version 0.7.2 of plugin you have to install "fog" before "aws"
$ vagrant plugin install fog --plugin-version=1.38
$ vagrant plugin install vagrant-aws --plugin-version=0.7.2
beside that I had to install the xmlrpc plugin to 0.3.0!
So far, none of the recommend workarounds above have worked for me.
- windows 10
- vagrant 2.2.3
- vagrant-aws 0.3.0
- vagrant-ovirt 0.0.2
- xmlrpc 0.3.0
It seems like this issue should be re-opened until a PR is merged in fixing it.
I followed @bdwyertech's advice and installed his gem. It installed without a hitch. Now to see if it works!
C:\Users\rconde\Projects\canned-env-vagrant (AWS -> gitlab) ฮป vagrant plugin install "C:\Users\rconde\Downloads\vagrant-aws-0.8.0.gem" Installing the 'C:\Users\rconde\Downloads\vagrant-aws-0.8.0.gem' plugin. This can take a few minutes... Fetching: iniparse-1.4.4.gem (100%) Fetching: fog-core-2.1.2.gem (100%) Fetching: fog-aws-3.3.0.gem (100%) Successfully uninstalled dry-inflector-0.1.2 Successfully uninstalled fog-aliyun-0.3.2 Successfully uninstalled fog-atmos-0.1.0 Successfully uninstalled fog-aws-2.0.1 Successfully uninstalled fog-brightbox-0.16.1 Successfully uninstalled fog-cloudatcost-0.1.2 Successfully uninstalled fog-core-1.45.0 Successfully uninstalled fog-digitalocean-0.4.0 Removing console Removing setup Successfully uninstalled fog-dnsimple-1.0.0 Successfully uninstalled fog-dynect-0.0.3 Successfully uninstalled fog-ecloud-0.3.0 Successfully uninstalled fog-google-0.1.0 Successfully uninstalled fog-internet-archive-0.0.1 Successfully uninstalled fog-joyent-0.0.1 Successfully uninstalled fog-local-0.6.0 Successfully uninstalled fog-openstack-0.3.9 Successfully uninstalled xml-simple-1.1.5 Installed the plugin 'vagrant-aws (0.8.0)'!
I don't understand why this issue is marked as closed.
any one able to install vagrant AWS plugin successfully
any one able to install vagrant AWS plugin successfully
I did using @bdwyertech's advice. I was just able to vagrant up a new instance in AWS!
this worked for me
This workaround worked for me:
Install fog-ovirt 1.0.1
vagrant plugin install --plugin-version 1.0.1 fog-ovirt
install vagrant-aws
vagrant plugin install vagrant-aws
Attempted @comeback2000's fix, but did not working for me. Specifically:
vagrant plugin uninstall vagrant-aws
vagrant plugin install --plugin-version 1.0.1 fog-ovirt
vagrant plugin install vagrant-aws
Then vagrant reload
Then SSH in vagrant ssh
And bundle
to install gem updates and fail on ovirt-engine-sdk
Fetching ovirt-engine-sdk 4.2.5
Installing ovirt-engine-sdk 4.2.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/vagrant/.rvm/gems/ruby-2.6.0/gems/ovirt-engine-sdk-4.2.5/ext/ovirtsdk4c
/home/vagrant/.rvm/rubies/ruby-2.6.0/bin/ruby -I /home/vagrant/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0
-r ./siteconf20190123-2213-1viu0tw.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=/home/vagrant/.rvm/rubies/ruby-2.6.0/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:
/home/vagrant/.rvm/gems/ruby-2.6.0/extensions/x86_64-linux/2.6.0/ovirt-engine-sdk-4.2.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/vagrant/.rvm/gems/ruby-2.6.0/gems/ovirt-engine-sdk-4.2.5
for inspection.
Results logged to
/home/vagrant/.rvm/gems/ruby-2.6.0/extensions/x86_64-linux/2.6.0/ovirt-engine-sdk-4.2.5/gem_make.out
An error occurred while installing ovirt-engine-sdk (4.2.5), and Bundler cannot continue.
Make sure that `gem install ovirt-engine-sdk -v '4.2.5' --source 'https://rubygems.org/'` succeeds
before bundling.
In Gemfile:
fog was resolved to 2.1.0, which depends on
fog-ovirt was resolved to 1.1.4, which depends on
ovirt-engine-sdk
In case this helps anyone, I had the following in a project's Gemfile:
gem 'aws-sdk'
gem 'fog'
I uninstalled my old vagrant-aws plugin
, downloaded the plugin from here, and installed it.
Then, I changed gem 'fog'
to gem 'fog-aws'
(I only need the aws
part of the library anyway) and bundled.
It worked.
This workaround worked for me:
- Install
fog-ovirt 1.0.1
vagrant plugin install --plugin-version 1.0.1 fog-ovirt
- install vagrant-aws
vagrant plugin install vagrant-aws
fog-ovirt
is one of the dependencies and since version 1.0.2 it depends onovirt-engine-sdk
which is giving trouble
This works with me, Thanks!
FWIW, the fog gem was broken out into multiple gems, one per service provider.
The right thing to do here is only install fog-aws, rather than the whole fog suite which installs truly unnecessary dependencies, like libvirt.
See #542 for proper resolution
Thanks, This solution worked for me !!