
こんにちは。今回はVirtualboxとVagtantを最新版に上げてみました。
内容はこんな感じ
Virtualbox 5.1.30 -> 5.2.6
Vagrant 2.0.0 -> 2.0.2
VirtualboxとVagrantをアップデートする
VirtualboxとVagrant、両方サイトからダウンロードしてきてアップデートしました。
Virtualboxのアップデート
Virtualboxはアプリを起動するとポップアップでいつもお知らせしてくれますよね。これに沿ってアップデート。(一時期、Virtualbox上げたら、Vagrantが動かない!といったこともありましたが、今は大丈夫そうですね。)
https://www.virtualbox.org/wiki/Downloads
Vagrantのアップデート
Vagrantも同様、公式Webサイトからダウンロード。
https://www.vagrantup.com/downloads.html
これで完了!となるはずが
無事ダウンロードして、ちゃんと動くか確かめるため、vagrant upしました。そしたら、、
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
Or you may want to try updating the installed plugins to their latest
versions:
vagrant plugin update
Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-hostsupdater (> 0)'
出たよ。
ちょっとおかしくなってるかもしれないから下のコード打って修復してみてってさ
vagrant plugin repair
うまくいったぽいので、もう一回vagrant up。
・・・
うまくは動いたんだけど、こんなメッセージが、、
Vagrant is currently configured to create VirtualBox synced folders with
the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:
https://www.virtualbox.org/manual/ch04.html#sharedfolders
This option can be disabled globally with an environment variable:
VAGRANT_DISABLE_VBOXSYMLINKCREATE=1
or on a per folder basis within the Vagrantfile:
config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false
なんかややこしそう。。教えられたサイト見てもよくわからないし。
ってことでさっき端折っていた、vagrant plugin expunge –reinstallとかを試しました。
だってこれ怪しすぎやん?笑
Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-hostsupdater (> 0)'
で、
vagrant plugin expunge --reinstall
こんな事聞かれるので、無言でエンター。
Continue? [N]:
じゃあこんな感じでできたよって言われる。
Installed the plugin 'vagrant-hostsupdater (1.0.2)'!
これで完成。
無事最新版で動かせるー!
今回のエラーは全く動かなくなる というものではなかったのでよかったけど、なにはともあれ、バージョンはできる限り一番新しいので運用したいですな。