0

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, run bundle 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?

janw
  • 6,672
  • 6
  • 26
  • 45
  • How did you install Ruby? If from yum or rpm, did you include the devel package? In general we recommend using rbenv or RVM as they allow you to manage your Ruby installation without worrying about using `sudo` or having admin privileges. – the Tin Man Nov 15 '16 at 21:55
  • @theTinMan With sudo apt-get istall vagrant Can you link to a example? – janw Nov 16 '16 at 22:27

0 Answers0