Skip to content
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

Cant install plugin on Ubuntu 16.04 with Vagrant 2.1.1 #891

Closed
ju2wheels opened this issue May 8, 2018 · 2 comments
Closed

Cant install plugin on Ubuntu 16.04 with Vagrant 2.1.1 #891

ju2wheels opened this issue May 8, 2018 · 2 comments

Comments

@ju2wheels
Copy link
Contributor

Steps to reproduce

  1. Install vagrant from deb on Vagrant website
  2. Install deps:
    sudo apt-get install qemu libvirt-bin ebtables dnsmasq
    sudo apt-get install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev
    
  3. Install plugin:
    vagrant plugin install vagrant-libvirt
    

Expected behaviour

vagrant-libvirt should be successfully installed.

Actual behaviour

$ 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.

    current directory: /home/user/.vagrant.d/gems/2.4.4/gems/ruby-libvirt-0.7.1/ext/libvirt
/opt/vagrant/embedded/bin/ruby -r ./siteconf20180507-27548-1d1vhbt.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.

Provided configuration options:
	--with-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=/opt/vagrant/embedded/bin/$(RUBY_BASE_NAME)
	--with-libvirt-include
	--without-libvirt-include
	--with-libvirt-lib
	--without-libvirt-lib
	--with-libvirt-config
	--without-libvirt-config
	--with-pkg-config
	--without-pkg-config
extconf.rb:73:in `<main>': libvirt library not found in default locations (RuntimeError)

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/user/.vagrant.d/gems/2.4.4/extensions/x86_64-linux/2.4.0/ruby-libvirt-0.7.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/user/.vagrant.d/gems/2.4.4/gems/ruby-libvirt-0.7.1 for inspection.
Results logged to /home/user/.vagrant.d/gems/2.4.4/extensions/x86_64-linux/2.4.0/ruby-libvirt-0.7.1/gem_make.out
$ cat /home/user/.vagrant.d/gems/2.4.4/extensions/x86_64-linux/2.4.0/ruby-libvirt-0.7.1/mkmf.log
"pkg-config --exists libvirt"
package configuration for libvirt is not found

System configuration

OS/Distro version::
Ubuntu 16.04 64bit

Libvirt version:

$ dpkg -l *libvirt*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                           Version                      Architecture                 Description
+++-==============================================-============================-============================-==================================================================================================
ii  gir1.2-libvirt-glib-1.0:amd64                  0.2.2-0.1ubuntu1             amd64                        libvirt glib mainloop integration
ii  libvirt-bin                                    1.3.1-1ubuntu10.22           amd64                        programs for the libvirt library
un  libvirt-daemon                                 <none>                       <none>                       (no description available)
un  libvirt-daemon-system                          <none>                       <none>                       (no description available)
ii  libvirt-dev:amd64                              1.3.1-1ubuntu10.22           amd64                        development files for the libvirt library
ii  libvirt-glib-1.0-0:amd64                       0.2.2-0.1ubuntu1             amd64                        libvirt glib mainloop integration
ii  libvirt0:amd64                                 1.3.1-1ubuntu10.22           amd64                        library for interfacing with different virtualization systems
ii  munin-libvirt-plugins                          0.0.6-1                      all                          Munin plugins using libvirt
ii  python-libvirt                                 1.3.1-1ubuntu1.1             amd64                        libvirt Python bindings

Output of vagrant version; vagrant plugin list:

$ vagrant version; vagrant plugin list
Installed Version: 2.1.1
Latest Version: 2.1.0
 
You're running an up-to-date version of Vagrant!
vagrant-aws (0.7.2)

Output of VAGRANT_LOG=debug vagrant ... --provider=libvirt

N/A

A Vagrantfile to reproduce the issue:

N/A

Are you using upstream vagrant package or your distros package?
Upstream

@ju2wheels
Copy link
Contributor Author

Closing, I got it working with the following:

CONFIGURE_ARGS="with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib" vagrant plugin install vagrant-libvirt

MarkGibbons added a commit to MarkGibbons/vagrant that referenced this issue Apr 25, 2019
Add a env property to the plugin resource to allow for setting environment variables.
Add and example of installing the vagrant-libvirt plugin, this plugin requires
specific environment variable settings. See vagrant-libvirt/vagrant-libvirt#891
MarkGibbons added a commit to sous-chefs/vagrant that referenced this issue Apr 25, 2019
Add a env property to the plugin resource to allow for setting environment variables.
Add and example of installing the vagrant-libvirt plugin, this plugin requires
specific environment variable settings. See vagrant-libvirt/vagrant-libvirt#891
MarkGibbons added a commit to MarkGibbons/vagrant that referenced this issue Apr 27, 2019
Convert the resources to custom resources
Add an env property to the plugin resource to allow for setting environment variables.
Add an example of installing the vagrant-libvirt plugin, this plugin requires
specific environment variable settings. See vagrant-libvirt/vagrant-libvirt#891
Fix test recipe typo
Tests pass in all environments.
Add mac test instructions.
MarkGibbons added a commit to MarkGibbons/vagrant that referenced this issue Apr 29, 2019
Convert the resources to custom resources
Add an env property to the plugin resource to allow for setting environment variables.
Add an example of installing the vagrant-libvirt plugin, this plugin requires
specific environment variable settings. See vagrant-libvirt/vagrant-libvirt#891
Fix test recipe typo
Tests pass in all environments.
Add mac test instructions.
Update the testing documentation
MarkGibbons added a commit to MarkGibbons/vagrant that referenced this issue Apr 29, 2019
Convert the resources to custom resources
Add an env property to the plugin resource to allow for setting environment variables.
Add an example of installing the vagrant-libvirt plugin, this plugin requires
specific environment variable settings. See vagrant-libvirt/vagrant-libvirt#891
Fix test recipe typo
Tests pass in all environments.
Add mac test instructions.
Update the testing documentation
MarkGibbons added a commit to MarkGibbons/vagrant that referenced this issue May 11, 2019
Convert the resources to custom resources
Add an env property to the plugin resource to allow for setting environment variables.
Add an example of installing the vagrant-libvirt plugin, this plugin requires
specific environment variable settings. See vagrant-libvirt/vagrant-libvirt#891
Fix test recipe typo
Tests pass in all environments.
Add mac test instructions.
Update the testing documentation
Update the readme to fix example errors.
MarkGibbons added a commit to MarkGibbons/vagrant that referenced this issue May 11, 2019
Convert the resources to custom resources
Add an env property to the plugin resource to allow for setting environment variables.
Add an example of installing the vagrant-libvirt plugin, this plugin requires
specific environment variable settings. See vagrant-libvirt/vagrant-libvirt#891
Fix test recipe typo
Tests pass in all environments.
Add mac test instructions.
Update the testing documentation
Update the readme to fix example errors.
@archenroot
Copy link

I eventually got into this situation as well on Gentoo system I was cleaning .vagrant subfolders etc. I had to simply clean shell envars by ./etc/profile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants