fgrehm/vagrant-lxc

vagrant plugin install vagrant-lxc gives this message

amanagr opened this issue · 5 comments

Installing the 'vagrant-lxc' 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.21), and Bundler cannot continue.
Make sure that gem install ffi -v '1.9.21' 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.

/opt/vagrant/embedded/bin/ruby -r ./siteconf20180209-4243-lgiw8z.rb extconf.rb

checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
creating extconf.h
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
Running autoreconf for libffi
/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi/autogen.sh: 2: exec: autoreconf: not found
libffi.mk:6: recipe for target '"/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a' failed
make: *** ["/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a] Error 127

make failed, exit code 2

Gem files will remain installed in /home/a/.vagrant.d/gems/gems/ffi-1.9.21 for inspection.
Results logged to /home/a/.vagrant.d/gems/extensions/x86_64-linux/2.2.0/ffi-1.9.21/gem_make.out

On setting debug:
/opt/vagrant/embedded/gems/gems/vagrant-1.8.6/bin/vagrant:174:in `

'
INFO interface: 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.21), and Bundler cannot continue.
Make sure that gem install ffi -v '1.9.21' 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.

/opt/vagrant/embedded/bin/ruby -r ./siteconf20180209-5042-jjr37q.rb extconf.rb

checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
creating extconf.h
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
Running autoreconf for libffi
/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi/autogen.sh: 2: exec: autoreconf: not found
libffi.mk:6: recipe for target '"/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a' failed
make: *** ["/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a] Error 127

make failed, exit code 2

Gem files will remain installed in /home/a/.vagrant.d/gems/gems/ffi-1.9.21 for inspection.
Results logged to /home/a/.vagrant.d/gems/extensions/x86_64-linux/2.2.0/ffi-1.9.21/gem_make.out

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.21), and Bundler cannot continue.
Make sure that gem install ffi -v '1.9.21' 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.

/opt/vagrant/embedded/bin/ruby -r ./siteconf20180209-5042-jjr37q.rb extconf.rb

checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for shlwapi.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
creating extconf.h
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
Running autoreconf for libffi
/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi/autogen.sh: 2: exec: autoreconf: not found
libffi.mk:6: recipe for target '"/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a' failed
make: *** ["/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a] Error 127

make failed, exit code 2

Gem files will remain installed in /home/a/.vagrant.d/gems/gems/ffi-1.9.21 for inspection.
Results logged to /home/a/.vagrant.d/gems/extensions/x86_64-linux/2.2.0/ffi-1.9.21/gem_make.out

INFO interface: Machine: error-exit ["Vagrant::Errors::BundlerError", "Bundler, the underlying system Vagrant uses to install plugins,\nreported an error. The error is shown below. These errors are usually\ncaused by misconfigured plugin installations or transient network\nissues. The error from Bundler is:\n\nAn error occurred while installing ffi (1.9.21), and Bundler cannot continue.\nMake sure that gem install ffi -v '1.9.21' succeeds before bundling.\n\nWarning: 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.\n\n /opt/vagrant/embedded/bin/ruby -r ./siteconf20180209-5042-jjr37q.rb extconf.rb\nchecking for ffi.h... no\nchecking for ffi.h in /usr/local/include,/usr/include/ffi... no\nchecking for shlwapi.h... no\nchecking for rb_thread_blocking_region()... no\nchecking for rb_thread_call_with_gvl()... yes\nchecking for rb_thread_call_without_gvl()... yes\ncreating extconf.h\ncreating Makefile\n\nmake "DESTDIR=" clean\n\nmake "DESTDIR="\nRunning autoreconf for libffi\n/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi/autogen.sh: 2: exec: autoreconf: not found\nlibffi.mk:6: recipe for target '"/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a' failed\nmake: *** ["/home/a/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi-x86_64-linux"/.libs/libffi_convenience.a] Error 127\n\nmake failed, exit code 2\n\nGem files will remain installed in /home/a/.vagrant.d/gems/gems/ffi-1.9.21 for inspection.\nResults logged to /home/a/.vagrant.d/gems/extensions/x86_64-linux/2.2.0/ffi-1.9.21/gem_make.out\n"]

sudo gem install ffi -v '1.9.10' -- success
But 1.9.21 same error
apt-get install ruby-dev -- Doesn't fixes it.
OS - Ubuntu 16.04

@fgrehm Please help.

ccope commented

Try updating your vagrant version (debs are available on vagrantup.com), there were issues with bundler in 1.8.x

I was using Vagrant 1.8.6.
Then I upgraded to 2.0.2.
Then it worked.