You are not logged in.

#1 2016-08-31 14:46:22

captainlechuck
Member
Registered: 2016-08-31
Posts: 1

Vagrant + Libvirt Ruby-libvirt-0.6.0 incompatible library version

Hi Guys,

I am new here so please go easy on me wink

I am trying to get Vagrant working with Libvirt and I am stuck.

I've installed the libvirt plugin following the arch wiki with this workaround:

CONFIGURE_ARGS='with-ldflags=-L/opt/vagrant/embedded/lib with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib' \
GEM_HOME=~/.vagrant.d/gems GEM_PATH=$GEM_HOME:/opt/vagrant/embedded/gems PATH=/opt/vagrant/embedded/bin:$PATH \
vagrant plugin install vagrant-libvirt

but when I try to start the box with:

vagrant up --provider=libvirt

I get the following issue:

Bringing machine 'default' up with 'libvirt' provider...
/home/username/.vagrant.d/gems/gems/ruby-libvirt-0.6.0/lib/libvirt.rb:11:in `require': incompatible library version - /home/username/.vagrant.d/gems/extensions/x86_64-linux/2.2.0/ruby-libvirt-0.6.0/_libvirt.so (LoadError)
        from /home/username/.vagrant.d/gems/gems/ruby-libvirt-0.6.0/lib/libvirt.rb:11:in `<top (required)>'
        from /home/username/.vagrant.d/gems/gems/fog-libvirt-0.0.3/lib/fog/libvirt.rb:4:in `require'
        from /home/username/.vagrant.d/gems/gems/fog-libvirt-0.0.3/lib/fog/libvirt.rb:4:in `<top (required)>'
        from /home/username/.vagrant.d/gems/gems/vagrant-libvirt-0.0.35/lib/vagrant-libvirt/driver.rb:1:in `require'
        from /home/username/.vagrant.d/gems/gems/vagrant-libvirt-0.0.35/lib/vagrant-libvirt/driver.rb:1:in `<top (required)>'
        from /home/username/.vagrant.d/gems/gems/vagrant-libvirt-0.0.35/lib/vagrant-libvirt/provider.rb:29:in `driver'
        from /home/username/.vagrant.d/gems/gems/vagrant-libvirt-0.0.35/lib/vagrant-libvirt/action/create_networks.rb:26:in `initialize'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:90:in `new'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:90:in `finalize_action'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:20:in `block in initialize'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:20:in `map'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:20:in `initialize'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:170:in `new'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:170:in `to_app'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/call.rb:52:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/warden.rb:34:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/builder.rb:116:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `block in run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/action/runner.rb:66:in `run'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:225:in `action_raw'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:200:in `block in action'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/environment.rb:561:in `lock'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:186:in `call'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/machine.rb:186:in `action'
        from /opt/vagrant/embedded/gems/gems/vagrant-1.8.5/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

I've googled it and I've come up with a possible solution here:

https://github.com/vagrant-libvirt/vagr … issues/541
and
https://gist.github.com/robled/070e1922 … libvirt-sh

but I am still getting the same error.

Any help would be really appreciated.
Thank you

Offline

#2 2016-10-02 19:46:55

aliena
Member
Registered: 2015-10-09
Posts: 29

Re: Vagrant + Libvirt Ruby-libvirt-0.6.0 incompatible library version

Hi and welcome to the Arch Linux forums.

I encountered the same problem as you. It is a workaround but for me it worked by installing version 0.6.0 of ruby-libvirt.
This is achieved by adding this to the corresponding line in the workaround you already mentioned:

gem install ruby-libvirt -v 0.6.0
                         ^

Maybe it helps to start over first by removing all of ~/.vagrant.d if it contains nothing of importance.

Hope this solves the problem for you, too.

EDIT: clarification about gem command

Last edited by aliena (2016-10-02 19:53:25)

Offline

Board footer

Powered by FluxBB