-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"vagrant plugin install vagrant-libvirt" on Ubuntu 14.04 must display a user-friendly message if libvirt is not installed #7039
Comments
Hi @vhosakot Thank you for opening an issue, and I definitely understand how frustrating this can be. Unfortunately vagrant-libvirt is a third-party plugin and we cannot catch all errors from plugins. It is the plugin author's responsibility to properly list all plugin requirements. I'm sorry this cause you trouble, but unfortunately this is the plugin author's responsibility, not Vagrant core. I would recommend opening an issue on that plugin. Thanks! 😄 |
Can't Vagrant check if the "libvirt-dev" package is installed or not before allowing the vagrant-libvirt plugin to be installed ? On Ubuntu, can't Vagrant issue one of the following commands to check if the "libvirt-dev" package exists or not when installing the vagrant-libvirt plugin ? If the libvirt-dev package is not installed, Vagrant could throw a user-friendly error and exit.
or
or
|
Hi @vhosakot Unfortunately it's not sustainable for Vagrant to know the requirements for every plugin. Additionally, the commands for each operating system are different and these requirements can change between versions. This is why it's best left to the plugin authors to list the requirements in the installation documentation. |
Found this page on Google looking for help. Thanks @vhosakot for the answer. "Every plugin?" You mean like the plugin that people use to use Vagrant with KVM? [...] |
I'm not founded And problem continues.
The following packages have unmet dependencies:
libvirt-bin : Depends: libvirt-daemon-system (>= 1.2.9-9+deb8u3) but it is not going to be installed
Depends: libvirt-clients (>= 1.2.9-9+deb8u3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages. I try to install vagrant-libvirt plugin and this error appears: $ vagrant plugin install vagrant-libvirt
Installing the 'vagrant-libvirt' 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.
/opt/vagrant/embedded/bin/ruby -r ./siteconf20161216-23024-ybwlm0.rb extconf.rb
*** 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.
...
extconf.rb:73:in `<main>': libvirt library not found in default locations (RuntimeError)
extconf failed, exit code 1
Gem files will remain installed in /home/tosystems/.vagrant.d/gems/2.2.5/gems/ruby-libvirt-0.7.0 for inspection.
Results logged to /home/tosystems/.vagrant.d/gems/2.2.5/extensions/x86_64-linux/2.2.0/ruby-libvirt-0.7.0/gem_make.out Look at this line:
So I try to install also |
Error "libvirt library not found in default locations" can be solved by specifying the library location as in this example: Installing the 'vagrant-libvirt' plugin. This can take a few minutes... ls -la /usr/include/libvirt -rw-r--r-- 1 root root 3975 Apr 5 06:22 libvirt-common.h |
Hi, I tried to use the
So I had to add a second configure parameter to the command line
|
follow the step listed by Wenzel and I am able to get packer/vagrant to create VM under qemu |
Wenzel's answer worked for me too, thank you! |
Tried everything in this thread with no luck. Even the last answer from @Wenzel doesn't work on Ubuntu 16.04.x and this is not a good experience for Linux developers wanting to use Vagrant. As this seems to be a common issue, is there a way we can improve the documentation? Where is the best place to start with that? cc @acornies @nicholasjackson |
My latest error during installation - https://gist.github.com/alexellis/046fa757113105ac1871644620756aed |
@alexellis seems like your |
With Ubuntu 18.04 bionic The issue is
The following is enough to make it sufficient to be installable but still not work - Now if we check carefully via
But this still does not work. The final piece is to use
And finally it works
|
However it's still not perfect
|
People, I've managed to fix this by providing a manually built Ubuntu package. Mandatory fix is to bump embedded ruby to 2.5.3. Relevant PR: hashicorp/vagrant-installers#145 Edit: I've created a Debian/Ubuntu package with I have no malicious intentions, but still use at your own risk. |
@syndbg hi there. While I did find that the appimage version of Vagrant has difficulty locating the correct paths for libvirt, installing the deb package worked fine installing the building the vagrant-libvirt plugin. |
On centos 7.5, we must install |
This is also documented in: https://github.com/vagrant-libvirt/vagrant-libvirt#possible-problems-with-plugin-installation-on-linux, so in my case (F28), i just have to run :
|
Issue resolved after this package yum install libvirt-devel |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I downloaded Vagrant 1.8.1 for Ubuntu 14.04 and see the following errors when I run "vagrant plugin install vagrant-libvirt" if libvirt is not installed. Below are the steps I ran.
"vagrant plugin install vagrant-libvirt" throws the following error that is tough to understand:
Then, I ran the following command.
"vagrant plugin install vagrant-libvirt" still threw the following error that is tough to understand:
Then, I ran the following command.
"vagrant plugin install vagrant-libvirt" finally worked this time!
If libvirt is not installed, It would be great if Vagrant displays a user-friendly message like:
The text was updated successfully, but these errors were encountered: