Home > Software engineering >  Installing ruby gems ruby-libvirt, vagrant-libvirt, fog-libvirt… failure missing « libvirt » library
Installing ruby gems ruby-libvirt, vagrant-libvirt, fog-libvirt… failure missing « libvirt » library

Time:12-01

When trying to install ruby gems to enable libvirt management for vagrant, the installation fails with a undocumented message « it depends on a library which is not currently installed : libvirt ».

Libvirt is working, I am able to compile manually « vagrant-libvirt », and even starting and configuring qemu VMs using virsh.

The host is a VMWare one, but the nested virtualization is enabled. The Virtualization « VT-x » is visible thru lscpu and « vmx / svm » capabilities are presents in /proc/cpuinfo.

Vagrant failed to install the requested plugin because it depends
on a library which is not currently installed on this system. The
following library is required by the 'vagrant-libvirt' plugin:

  libvirt

Please install the library and then run the command again.

I have installed all packages / gems https://computingforgeeks.com/use-vagrant-with-libvirt-kvm-on-centos/ and cannot figure how ruby is trying to talk to libvirt, with which library that may be missing.

Tried both with RHEL, Centos8 (alma), Debian sid.

CodePudding user response:

There is a installation guide in the documentation page for vagrant-libvirt, you should check that out first, in case if you haven't already.

Package maintainers sometimes choose to split libraries into base and developer packages. Usually, base package should fulfill the requirements, but in some cases, you might also need the developer packages. In Debian-based distros, you can find *-dev, and in Fedora-based distros, you can find *-devel packages.

On a side note, if you're having a hard time searching for an alternative software package manager, you should make use of this webpage - pkgs.org.

CodePudding user response:

Regarding to https://GitHub.com/vagrant-libvirt/vagrant-libvirt/issues/1104 , the problem was really a library path not defined.

The true solution for this problem with Hashicorp released vagrant packages is to force the libraries to vagrant:

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