Background
The command vagrant plugin install vagrant-hostsupdater
gives the following error
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.14), and Bundler cannot continue. Make sure that
gem install ffi -v '1.9.14'
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, runbundle config disable_multisource true
.Gem::Ext::BuildError: ERROR: Failed to build gem native extension.current directory: /home/me/.vagrant.d/gems/gems/ffi-1.9.14/ext/ffi_c /usr/bin/ruby2.3 -r
./siteconf20161115-3798-7g7yrs.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /home/me/.vagrant.d/gems/gems/ffi-1.9.14 for inspection. Results logged to /home/me/.vagrant.d/gems/extensions/x86_64-linux/2.3.0/ffi-1.9.14/gem_make.out
The error/problem
So I ran sudo gem install ffi -v '1.9.14'
(without sudo I get a permission error)
Building native extensions. This could take a while... ERROR: Error installing ffi: ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.14/ext/ffi_c /usr/bin/ruby2.3 -r ./siteconf20161115-4273-wovmbb.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/ffi-1.9.14 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.14/gem_make.out
I tried un-installing vagrant and ruby it doesn't help.
Does anybody know what is going wrong here?