質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Q&A

解決済

1回答

847閲覧

vagrantのプラグイン「vbguest」のインストールが失敗する。(ffiが原因?)

kenpon

総合スコア7

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

0グッド

0クリップ

投稿2018/02/10 12:02

vbguestをインストールしたい

macbookproにて、vagrantのプラグイン「vbguest」をインストールしようとしています。
実行コマンドは以下。

vagrant plugin install vagrant-vbguest

上記の結果、以下のメッセージが出てきます。

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 ./siteconf20180210-3777-1ij2j8u.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=" mkdir -p "/Users/username/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c"/libffi-i386; (if [ ! -f "/Users/username/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c"/libffi-i386/configure ]; then echo "Running autoreconf for libffi"; cd "/Users/username/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi" && /bin/sh /Users/username/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi/autogen.sh > /dev/null; fi); (if [ ! -f "/Users/username/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c"/libffi-i386/Makefile ]; then echo "Configuring libffi for i386"; cd "/Users/username/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c"/libffi-i386 && env CC=" clang" CFLAGS="-arch i386 " LDFLAGS="-arch i386" "/Users/username/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi"/configure --disable-static --with-pic=yes --disable-dependency-tracking --disable-docs --host=i386-apple-darwin > /dev/null; fi); env MACOSX_DEPLOYMENT_TARGET=10.4 /Applications/Xcode.app/Contents/Developer/usr/bin/make -C "/Users/username/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c"/libffi-i386 Running autoreconf for libffi autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 main::scan_file() called too early to check prototype at /opt/chefdk/embedded/bin/aclocal line 621. autom4te: need GNU m4 1.4 or later: /opt/chefdk/embedded/bin/m4 aclocal: /opt/chefdk/embedded/bin/autom4te failed with exit status: 1 autoreconf: aclocal failed with exit status: 1 Configuring libffi for i386 env: /Users/username/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c/libffi/configure: No such file or directory make[1]: *** No targets specified and no makefile found. Stop. make: *** ["/Users/username/.vagrant.d/gems/gems/ffi-1.9.21/ext/ffi_c"/libffi-i386/.libs/libffi_convenience.a] Error 2 make failed, exit code 2 Gem files will remain installed in /Users/username/.vagrant.d/gems/gems/ffi-1.9.21 for inspection. Results logged to /Users/username/.vagrant.d/gems/extensions/universal-darwin-12/2.2.0/ffi-1.9.21/gem_make.out

試したこと

エラーメッセージに書いてある以下のコマンドを実行しても、結果は変わりませんでした。

gem install ffi -v '1.9.21'

ネット上で見つけた以下のコマンドでも変わらず。

VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 vagrant plugin install vagrant-vbguest

以下のコマンドも実行しましたが、エラーが出てきてしまい、うまく行きません。

gem install --install-dir ~/.vagrant.d/gems 'ffi' -v '1.9.21'

エラーメッセージ

ERROR: Use --install-dir or --user-install but not both

上記を以下に書き換えて実行しても、エラー。

gem install --user-install ~/.vagrant.d/gems 'ffi' -v '1.9.21'
RROR: Can't use --version w/ multiple gems. Use name:ver instead.

rubyやgemの知識がなく、お手上げです。

補足情報(FW/ツールのバージョンなど)

macOS High Sierra
バージョン10.13.3

gem environment

RubyGems Environment: - RUBYGEMS VERSION: 2.6.4 - RUBY VERSION: 2.1.8 (2015-12-16 patchlevel 440) [x86_64-darwin13.0] - INSTALLATION DIRECTORY: /Users/username/.chefdk/gem/ruby/2.1.0 - USER INSTALLATION DIRECTORY: /Users/username/.chefdk/gem/ruby/2.1.0 - RUBY EXECUTABLE: /opt/chefdk/embedded/bin/ruby - EXECUTABLE DIRECTORY: /Users/username/.chefdk/gem/ruby/2.1.0/bin - SPEC CACHE DIRECTORY: /Users/username/.gem/specs - SYSTEM CONFIGURATION DIRECTORY: /opt/chefdk/embedded/etc - RUBYGEMS PLATFORMS: - ruby - x86_64-darwin-13 - GEM PATHS: - /Users/username/.chefdk/gem/ruby/2.1.0 - /opt/chefdk/embedded/lib/ruby/gems/2.1.0 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => false - :bulk_threshold => 1000 - "install" => "--user --no-document" - "update" => "--user --no-document" - REMOTE SOURCES: - https://rubygems.org/ - SHELL PATH: - /opt/chefdk/bin - /Users/username/.chefdk/gem/ruby/2.1.0/bin - /opt/chefdk/embedded/bin - /Users/username/.rbenv/shims - /usr/local/bin - /usr/bin - /bin - /usr/sbin - /sbin

以上、よろしくお願いいたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

vagrantのバージョンはいくつでしょうか?
ちなみにですが、本件に該当するかはわかりませんが、vagrantを最新のバージョンにすることで問題が解消することが結構あったりします。

投稿2018/03/01 22:53

bassbone

総合スコア767

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

kenpon

2018/03/26 16:13

返事が遅くなり、申し訳ありません。 vagrantの最新版をダウンロードしたらうまくいきました! ありがとうございました!! 以下、結果。 $vagrant plugin install vagrant-vbguest Installing the 'vagrant-vbguest' plugin. This can take a few minutes... Fetching: open4-1.3.4.gem (100%) Fetching: Platform-0.4.0.gem (100%) Fetching: popen4-0.1.2.gem (100%) Fetching: sahara-0.0.17.gem (100%) Fetching: vagrant-berkshelf-5.1.2.gem (100%) The Vagrant Berkshelf plugin requires Berkshelf from the Chef Development Kit. You can download the latest version of the Chef Development Kit from: https://downloads.chef.io/chefdk Installing Berkshelf via other methods is not officially supported. Fetching: vagrant-cachier-1.2.1.gem (100%) Fetching: vagrant-omnibus-1.5.0.gem (100%) Fetching: micromachine-2.0.0.gem (100%) Fetching: vagrant-vbguest-0.15.1.gem (100%) Installed the plugin 'vagrant-vbguest (0.15.1)'!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問