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

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

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

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

Q&A

解決済

4回答

7760閲覧

vagrantコマンドで以下のエラーが出る際の解消法

kuriya

総合スコア35

Vagrant

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

1グッド

0クリップ

投稿2017/04/26 05:09

ターミナルでvagrantと打つと以下のエラーが出るようになってしまいました。

/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- vagrant-share/helper/api (LoadError) from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:244:in `<encoded>' from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:16:in `RGLoader_load' from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:16:in `<top (required)>' from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share.rb:23:in `block in <class:Plugin>' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:75:in `call' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:75:in `block (2 levels) in help' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:49:in `block in each' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:48:in `each' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:48:in `each' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:69:in `block in help' from /opt/vagrant/embedded/lib/ruby/2.2.0/optparse.rb:917:in `initialize' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:57:in `new' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:57:in `help' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:32:in `execute' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:308:in `cli' from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/bin/vagrant:127:in `<main>'

vagrant upvagrant plugin listvagrant sshなどのコマンドは使えます。
ただ`vagrant upすると以下のエラーが出るのでこちらも同じ原因かも知れないと思っています。

Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxsf" is not available. This filesystem is made available via the VirtualBox Guest Additions and kernel module. Please verify that these guest additions are properly installed in the guest. This is not a bug in Vagrant and is usually caused by a faulty Vagrant box. For context, the command attemped was: set -e mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant The error output from the command was: /sbin/mount.vboxsf: mounting failed with the error: No such device

環境

Vagrant 1.9.4
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
mac os sierra 10.12.4(16E195)

やってみたこと

  • vagrantをアンインストールして再度インストールした。
  • rubyのバージョンを最新にした。
  • vagrant plugin updatevagrantのプラグインを最新にした。
  • vagrant plugin expunge --reinstallでvagrantのプラグインをアンインストールして再インストールした。

これら何も変化がありませんでした。

解決方法の分かる方、ご教授願います。

KiyoshiMotoki👍を押しています

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

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

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

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

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

guest

回答4

0

I also had this problem on both CentOS and Ubuntu.

I have resorted to using version 1.9.3 for now, I think 1.9.4 is broken.

https://releases.hashicorp.com/vagrant/1.9.3/

投稿2017/04/26 15:00

SteveRandall

総合スコア14

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

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

kwatch

2017/04/27 03:50

Thanks a lot!
guest

0

ベストアンサー

vagrant plugin install vagrant-share --plugin-version 1.1.8
参照:
https://github.com/mitchellh/vagrant/issues/8519

投稿2017/04/28 05:07

kzkzkz

総合スコア17

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

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

kuriya

2017/04/28 07:53

ありがとうございます。直りました。
kzkzkz

2017/04/28 09:06

よかったです。
guest

0

to fix this error

bash

1$ vagrant plugin install vagrant-share --plugin-version 1.1.8

投稿2017/04/27 07:19

編集2017/04/27 07:23
KaoruNODA

総合スコア8

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

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

kuriya

2017/04/28 07:53 編集

ご回答いただきありがとうございました。 惜しかったです。 vagrant plugin install vagrant-share --plugin-version 1.1.8 こちらでいけました。
guest

0

私の環境では、仮想OSのカーネルのバージョンアップで解決できました。

$ sudo yum install -y ftp://ftp.pbone.net/mirror/ftp.scientificlinux.org/linux/scientific/6.2/x86_64/updates/security/kernel-devel-2.6.32-573.el6.x86_64.rpm

参考になれば、、、

投稿2017/04/26 05:52

koizumi

総合スコア230

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

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

kuriya

2017/04/26 06:53

ご回答ありがとうございます。 申し訳ないのですが、求めていた回答とは異なっていました。 vagrant up後のエラーではなく、その手前のvagrantというコマンドのみを打った時にすでにエラーが出ていて、そちらを解決がしたかったです汗
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.49%

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

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

質問する

関連した質問