Vagrantのboxをaddしたらエラーになりました。その対応をしたので記録しておきます。
これが参考になれば何よりです。
問題のエラーとそのコマンド
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
$ vagrant box add box_name box_name.box Vagrant failed to initialize at a very early stage: The plugins failed to initialize correctly. This may be due to manual modifications made within the Vagrant home directory. Vagrant can attempt to automatically correct this issue by running: vagrant plugin repair If Vagrant was recently updated, this error may be due to incompatible versions of dependencies. To fix this problem please remove and re-install all plugins. Vagrant can attempt to do this automatically by running: vagrant plugin expunge --reinstall Error message given during initialization: Unable to resolve dependency: user requested 'sahara (> 0)' |
vagrantのプラグインの再インストールすれば直るよ的なメッセージなのでしょうか。
とりあえず表示されたコマンド(vagrant plugin expunge –reinstall)を叩いてみます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
$ vagrant plugin expunge --reinstall This command permanently deletes all currently installed user plugins. It should only be used when a repair command is unable to properly fix the system. Continue? [Y/N]:y All user installed plugins have been removed from this Vagrant environment! Vagrant will now attempt to reinstall user plugins that were removed. Installing the 'sahara' 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: Unable to resolve dependency: user requested 'sahara (> 0)' |
どうやら再インストール出来たようです。
再びboxをaddしてみます。
1 2 3 4 5 6 |
$ vagrant box add box_name box_name.box ==> box: Box file was not detected as metadata. Adding it directly... ==> box: Adding box 'box_name' (v0) for provider: box: Unpacking necessary files from: file://c:/User/test.box box: ==> box: Successfully added box 'box_name' (v0) for 'virtualbox'! |
成功したようです。
この後、
1 |
$ vagrant init box_name |
1 |
$ vagrant up |
で無事vagrantが立ち上がりました。完