Help us understand the problem. What is going on with this article?

MACでvagrant-vbox-snapshotのプラグインを入れようとしたらffi (1.9.6)のエラーが出た

More than 5 years have passed since last update.


$ vagrant plugin install vagrant-vbox-snapshot
Installing the 'vagrant-vbox-snapshot' 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.6), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.6'` succeeds before bundling.

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Applications/Vagrant/embedded/bin/ruby extconf.rb 
checking for ffi.h... *** 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:
/Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:1044:in `block in have_header'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:310:in `open'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:310:in `open'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
    from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:1043:in `have_header'
    from extconf.rb:16:in `<main>'

Gem files will remain installed in /Users/yonezawas/.vagrant.d/gems/gems/ffi-1.9.6 for inspection.
Results logged to /Users/yonezawas/.vagrant.d/gems/gems/ffi-1.9.6/ext/ffi_c/gem_make.out



sudo gcc



By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree

You can view the license agreements in Xcode's About Box, or at /Applications/

clang: error: no input files


$ vagrant plugin install vagrant-vbox-snapshot
Installing the 'vagrant-vbox-snapshot' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vbox-snapshot (0.0.8)'!
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away