Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1438773 - vagrant plugin install not working due missing dependencies
Summary: vagrant plugin install not working due missing dependencies
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: vagrant
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Valena
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-04 11:47 UTC by Woi
Modified: 2017-06-19 11:14 UTC (History)
8 users (show)

Fixed In Version: vagrant-1.8.1-6.fc24 vagrant-1.8.5-3.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-24 04:55:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Woi 2017-04-04 11:47:14 UTC
Description of problem:
vagrant-mutate is not available in Fedora. Neither from the repositories nor 
by running <vagrant plugin install mutate> 

How reproducible:
Install vagrant from Fedora repositories and try to install vagrant-mutate plugin by running vagrant plugin install mutate.


Steps to Reproduce:
Follow the advice of https://fedoramagazine.org/running-vagrant-fedora-22/ and https://developer.fedoraproject.org/tools/vagrant/vagrant-plugins.html
1. dnf install vagrant-libvirt
2. vagrant plugin install mutate

Actual results:
Installation fails because of missing headers and dependencies 

Expected results:
<vagrant mutate> command is available

Additional info:
<dnf install vagrant-libvirt zlib-devel> fixes this issue

Possible solutions that come to my mind: Either package vagrant-mutant to the Fedora repos or add the missing dependencies to vagrant or vagrant-libvirt

Comment 1 Vít Ondruch 2017-04-04 11:56:38 UTC
Isn't the name of the plugin "vagrant-mutate"? I.e. you should use "vagrant plugin install vagrant-mutate" to install the plugin.

Comment 2 Woi 2017-04-10 09:35:57 UTC
Hey Vit,

thanks for the quick replay. Your right it's "vagrant plugin install vagrant-mutate". But it's was a typo during creation of this bug report, not during installation of vagrant-mutate. However I'll take the chance to add some more details, because  vagrant-libvirt and zlib-devel are not sufficient for building vagrant-mutate:

1. dnf group install with-optional virtualiation
2. dnf install vagrant
3. vagrant plugin install vagrant-mutate : Error message [1]
4. dnf install libvirt-devel rubygem-ruby-libvirt ruby-devel redhat-rpm-config
5. vagrant plugin install vagrant-mutate : Error message [2]
6. dnf install zlib-devel
7. vagrant plugin install vagrant-mutate -> working
 


[1]
$ vagrant plugin install vagrant-mutate
Installing the 'vagrant-mutate' plugin. This can take a few minutes...
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:

An error occurred while installing ffi (1.9.18), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.18'` succeeds before bundling.

Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/XXX/.vagrant.d/gems/gems/ffi-1.9.18/ext/ffi_c
/usr/bin/ruby -r ./siteconf20170410-4483-1jx1f8e.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /home/XXX/.vagrant.d/gems/gems/ffi-1.9.18 for inspection.
Results logged to /home/XXX/.vagrant.d/gems/extensions/x86_64-linux/2.3.0/ffi-1.9.18/gem_make.out
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/XXX/.vagrant.d/gems/gems/json-2.0.3/ext/json/ext/generator
/usr/bin/ruby -r ./siteconf20170410-4483-1m37p4f.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /home/XXX/.vagrant.d/gems/gems/json-2.0.3 for inspection.
Results logged to /home/XXX/.vagrant.d/gems/extensions/x86_64-linux/2.3.0/json-2.0.3/gem_make.out

$ 



[2]
$ vagrant plugin install vagrant-mutate
Installing the 'vagrant-mutate' plugin. This can take a few minutes...
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:

An error occurred while installing nokogiri (1.6.8.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.8.1'` succeeds before bundling.

Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/XXX/.vagrant.d/gems/gems/nokogiri-1.6.8.1/ext/nokogiri
/usr/bin/ruby -r ./siteconf20170410-6236-rzzbjh.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.1.0
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** 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
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib64
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/bin/$(RUBY_BASE_NAME)
	--help
	--clean
	--use-system-libraries
	--enable-static
	--disable-static
	--with-zlib-dir
	--without-zlib-dir
	--with-zlib-include
	--without-zlib-include=${zlib-dir}/include
	--with-zlib-lib
	--without-zlib-lib=${zlib-dir}/lib64
	--enable-cross-build
	--disable-cross-build

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

  /home/XXX/.vagrant.d/gems/extensions/x86_64-linux/2.3.0/nokogiri-1.6.8.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/marco/.vagrant.d/gems/gems/nokogiri-1.6.8.1 for inspection.
Results logged to /home/XXX/.vagrant.d/gems/extensions/x86_64-linux/2.3.0/nokogiri-1.6.8.1/gem_make.out

[marco@phoenix ~]$

Comment 3 Vít Ondruch 2017-04-10 12:38:13 UTC
Could you please check if you have rubygem-nokogiri and rubygem-ffi installed on your system? This should be better then installing and building them.

Comment 4 Woi 2017-04-10 21:38:08 UTC
Indeed, they are:

$ sudo dnf list installed rubygem-nokogiri rubygem-ffi
[...]
Installed Packages
rubygem-ffi.x86_64                      1.9.10-3.fc24                   @fedora 
rubygem-nokogiri.x86_64                 1.7.1-1.fc25.1                  @updates
$

Comment 5 Vít Ondruch 2017-04-11 05:25:38 UTC
Ok, so there is something on your system which forces the dependency on older Nokogiri and FFI. You have to discover what it is. What gems do you have on your system?

$ gem list

What other Vagrant plugins do you have on your system?

$ vagrant plugin list

My guess is that the fastest remedy would be to start with the clean ~/.vagrant.d directory ...

Comment 6 Pavel Valena 2017-04-11 13:42:33 UTC
Reproduced on F24 with `rubygem-ruby-libvirt-0.6.0-3.fc24`.
Updating to `rubygem-ruby-libvirt-0.7.0-1.fc24` fixed the issue for me.

What is your `rubygem-ruby-libvirt` version?

Comment 7 Pavel Valena 2017-04-11 13:44:03 UTC
The above is probably unrelated though. I will try to reproduce on F25.

Comment 8 Vít Ondruch 2017-04-12 11:26:59 UTC
It seems that one of the other Vagrant maintainers dropped this patch [1], which used to avoid this issues ...

[1] http://pkgs.fedoraproject.org/cgit/rpms/vagrant.git/diff/vagrant-1.7.4-install-plugins-in-isolation.patch?id=4b0b66a3ad4c08f6081c6a255b6892bf1379c209

Comment 9 Woi 2017-04-13 08:14:21 UTC
$ vagrant plugin list
vagrant-libvirt (0.0.37, system)
vagrant-mutate (1.2.0)
$

$ gem list|grep -ie nokogiri -ie ffi -ie ruby-libvirt
ffi (1.9.10)
nokogiri (1.7.1)
ruby-libvirt (0.7.0)
$ 


$ gem list

*** LOCAL GEMS ***

bigdecimal (1.2.8)
builder (3.2.2)
bundler (1.12.5)
childprocess (0.5.3)
did_you_mean (1.0.0)
domain_name (0.5.20170223)
erubis (2.7.0)
excon (0.45.4)
ffi (1.9.10)
fog-core (1.34.0)
fog-json (1.0.2)
fog-libvirt (0.3.0)
fog-xml (0.1.2)
formatador (0.2.5)
hashicorp-checkpoint (0.1.4)
http-cookie (1.0.3)
i18n (0.7.0)
io-console (0.4.5)
json (1.8.3)
listen (3.1.5)
log4r (1.1.10)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
multi_json (1.10.1)
net-scp (1.2.1)
net-sftp (2.1.2)
net-ssh (3.2.0)
netrc (0.10.3)
nokogiri (1.7.1)
psych (2.1.0)
rb-inotify (0.9.7)
rdoc (4.2.2)
rest-client (2.0.0)
ruby-libvirt (0.7.0)
unf (0.1.4)
unf_ext (0.0.7.2)
$

I'm testing with two systems, both with Fedora 25, both with freshly installed KVM, libvirt and vargrant. One System was installed as Fedora 24 the other already made a few more upgrades.

Comment 10 Pavel Valena 2017-04-20 14:05:55 UTC
Could you please test this build?

https://koji.fedoraproject.org/koji/taskinfo?taskID=19102567

Thanks!

Comment 11 Woi 2017-05-01 21:48:08 UTC
Looks good :)


What I did in detail:

$ rm -rf ~/.vagrant.d

$ vagrant plugin list
vagrant-libvirt (0.0.35, system)

$ sudo dnf remove libvirt-devel rubygem-ruby-libvirt ruby-devel redhat-rpm-config zlib-devel

(Sorry missed to set LANG=C for this one)
$ sudo dnf install https://kojipkgs.fedoraproject.org//work/tasks/2567/19102567/vagrant-1.8.5-3.fc25.noarch.rpm
Letzte Prüfung auf abgelaufene Metadaten: vor 0:27:05 am Mon May  1 22:57:17 2017.
Abhängigkeiten sind aufgelöst.
================================================================================
 Package                  Arch       Version             Paketquelle      Größe
================================================================================
Installieren:
 rubygem-builder          noarch     3.2.2-5.fc24        fedora            21 k
 rubygem-excon            noarch     0.45.4-2.fc24       fedora            32 k
 rubygem-fog-core         noarch     1.34.0-2.fc24       fedora            44 k
 rubygem-fog-json         noarch     1.0.2-2.fc24        fedora            11 k
 rubygem-fog-libvirt      noarch     0.3.0-1.fc25        fedora            31 k
 rubygem-fog-xml          noarch     0.1.2-2.fc24        fedora            13 k
 rubygem-formatador       noarch     0.2.5-2.fc24        fedora            14 k
 rubygem-multi_json       noarch     1.10.1-3.fc24       fedora            22 k
 rubygem-ruby-libvirt     x86_64     0.7.0-1.fc25        fedora            86 k
 vagrant-libvirt          noarch     0.0.35-3.fc25       updates           61 k
Aktualisieren:
 vagrant                  noarch     1.8.5-3.fc25        @commandline     488 k

Transaktionsübersicht
================================================================================
Installieren   10 Pakete
Aktualisieren   1 Paket

Gesamtgröße: 824 k
...
$


$ vagrant plugin install vagrant-mutate
Installing the 'vagrant-mutate' plugin. This can take a few minutes...
Installed the plugin 'vagrant-mutate (1.2.0)'!

$ vagrant plugin list
vagrant-libvirt (0.0.35, system)
vagrant-mutate (1.2.0)

Comment 12 Pavel Valena 2017-05-02 08:59:46 UTC
Great, thanks!

Submitting updates to Fedora.

Comment 13 Fedora Update System 2017-05-02 11:29:36 UTC
vagrant-1.8.5-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8a85d7a22d

Comment 14 Fedora Update System 2017-05-02 11:29:43 UTC
vagrant-1.8.1-6.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b3acfe7d80

Comment 15 Fedora Update System 2017-05-03 01:02:30 UTC
vagrant-1.8.1-6.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b3acfe7d80

Comment 16 Fedora Update System 2017-05-04 15:21:43 UTC
vagrant-1.8.5-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8a85d7a22d

Comment 17 Fedora Update System 2017-05-05 21:00:59 UTC
vagrant-1.8.5-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-8a85d7a22d

Comment 18 Timon 2017-05-23 14:31:35 UTC
$ vagrant 
Vagrant experienced a version conflict with some installed plugins!
This usually happens if you recently upgraded Vagrant. As part of the
upgrade process, some existing plugins are no longer compatible with
this version of Vagrant. The recommended way to fix this is to remove
your existing plugins and reinstall them one-by-one. To remove all
plugins:

    rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems

Note if you have an alternate VAGRANT_HOME environmental variable
set, the folders above will be in that directory rather than your
user's home directory.

The error message is shown below:

Bundler could not find compatible versions for gem "net-ssh":
  In snapshot (Gemfile.lock):
    net-ssh (= 2.9.2)

  In Gemfile:
    vagrant-libvirt was resolved to 0.0.32, which depends on
      fog-libvirt (~> 0.0.1) was resolved to 0.0.3, which depends on
        fog-core (>= 1.27.4, ~> 1.27) was resolved to 1.32.0, which depends on
          net-ssh (>= 2.1.3)

    vagrant was resolved to 1.8.5, which depends on
      net-sftp (~> 2.1) was resolved to 2.1.2, which depends on
        net-ssh (>= 2.6.5)

    vagrant was resolved to 1.8.5, which depends on
      net-sftp (~> 2.1) was resolved to 2.1.2, which depends on
        net-ssh (>= 2.6.5)

    vagrant was resolved to 1.8.5, which depends on
      net-ssh (~> 3.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

$ rpm -q vagrant
vagrant-1.8.5-3.fc25.noarch

Comment 19 Pavel Valena 2017-05-23 23:01:55 UTC
Hello Timon,

please provide us with an output the of 

`vagrant up --debug`

and 

`vagrant plugin list`

and

`rpm -q ruby-devel`

--

My guess is that you have some gems already installed(under vagrant), that conflict with the system ones. Does 

`rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems`

solve your issue?

Thanks!

Comment 20 Fedora Update System 2017-05-24 04:55:15 UTC
vagrant-1.8.1-6.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2017-05-24 05:01:05 UTC
vagrant-1.8.5-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Woi 2017-05-29 11:56:23 UTC
Thanks for your support :)

Comment 23 Timon 2017-06-19 11:14:51 UTC
`rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems`
solves, thanks


Note You need to log in before you can comment on or make changes to this bug.