vagrant-libvirt: Can't install vagrant-libvirt on Fedora
Error message showing that I don’t have libvirt on my distribution while I already installed:
vagrant plugin install vagrant-libvirt
- Error message:
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Building native extensions. This could take a while...
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.
Steps to reproduce the error:
-
Installed vagrant on my Fedora 35 following this doc: https://www.vagrantup.com/downloads
-
Installed libvirt following this doc: https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/#installing-virtualization-software
-
Added extra packages:
sudo dnf install -y gcc libvirt libvirt-devel libxml2-devel make ruby-devel libguestfs-tools -
Add user group
sudo usermod -aG libvirt $USER -
Reboot
-
Added vagrant-libvirt plugin:
vagrant plugin install vagrant-libvirt
Error message:
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Building native extensions. This could take a while...
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.
Does anyone know if I miss something?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (8 by maintainers)
Minor correction to the above instructions, you probably want to run the following to ensure an explicit install of the vagrant-libvirt dependencies so that fedora doesn’t think it can automatically remove them subsequently.
Or change the instruction
sudo dnf install @virtualization vagrant-libvirtto:I hadn’t considered that it would keep using the upstream package, thanks for sharing that, I’ll have to keep that in mind for any instructions I share.
Hopefullly something as simple as the following would work to switch to the distro packaged verison:
I got it. I keep uninstalling and installing vagrant with distro again but it always picks up the one from hashicorp because I have the repo enabled. I disable harshicorp repo and follow your step above. It works perfectly. Thanks a lot @electrofelix