MacOS High Sierraを何も考えずにインストールしたら、vagrantが起動しなくって死にそうになった。
というか、むやみにOSインストールしたらやっぱりあかんよね。。
vagrant プロジェクトのディレクトに移り、
$ vagrant up
failed MSpanList_Insert 0x1e3000 0xd232d689d3 0x0
fatal error: MSpanList_Insert
runtime stack:
runtime.throw(0x19816b)
/Users/mitchellh/code/3rdparty/go/src/runtime/panic.go:491 +0xad fp=0x7ffeefbff6a0 sp=0x7ffeefbff670
runtime.MSpanList_Insert(0x1b3988, 0x1e3000)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:692 +0x8f fp=0x7ffeefbff6c8 sp=0x7ffeefbff6a0
MHeap_FreeSpanLocked(0x1b0580, 0x1e3000, 0x100)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:583 +0x163 fp=0x7ffeefbff708 sp=0x7ffeefbff6c8
MHeap_Grow(0x1b0580, 0x8, 0x0)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:420 +0x1a8 fp=0x7ffeefbff748 sp=0x7ffeefbff708
MHeap_AllocSpanLocked(0x1b0580, 0x1, 0x0)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:298 +0x365 fp=0x7ffeefbff788 sp=0x7ffeefbff748
mheap_alloc(0x1b0580, 0x1, 0x12, 0x0)
/Users/mitchellh/code/3rdparty/go/src/runtime/mheap.c:190 +0x121 fp=0x7ffeefbff7b0 sp=0x7ffeefbff788
runtime.MHeap_Alloc(0x1b0580, 0x1, 0x10000000012, 0x10d39)
:
のようなエラーが、出てきて起動できなくなり。。。
結論から言うと、ここに解決策がありました。
https://stackoverflow.com/questions/39652593/virtualbox-error-on-macos-sierra
自分の環境では、vagrantの最新版を再インストールすることで、なんとか回復しました。
https://www.vagrantup.com/downloads.html
とりあえず、再インストールを済ませ、対象のディレクトリで vagrant up をすると、指示が出てきたので、それに従ってコマンドをいくらか打ち込んでみると、無事、vagrant upができました。
$ 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-vbguest (> 0)'
Takeos-MacBook-Pro:apparelx takeo$ vagrant plugin repair
Repairing currently installed plugins. This may take a few minutes...
Failed to automatically repair installed Vagrant plugins. To fix this
problem remove all user installed plugins and reinstall. Vagrant can
do this for you automatically by running the following command:
vagrant plugin expunge --reinstall
Failure message received during repair:
Unable to resolve dependency: user requested 'vagrant-share (> 0)'
$ 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? [N]: yes
All user installed plugins have been removed from this Vagrant environment!
Vagrant will now attempt to reinstall user plugins that were removed.
Takeos-MacBook-Pro:apparelx takeo$ vagrant plugin repair
Repairing currently installed plugins. This may take a few minutes...
Installed plugins successfully repaired!
走り書きですが、もしvagrantが起動しなくなっても、焦らずに対処すればなんとかなったのでメモ。
● ファイルがシンクロしなくなった
http://www.qed42.com/blog/macos-sierra-issues-vagrant
● private_networkで設定したIPに接続ができない
https://qiita.com/junqiq/items/a19d3ea48b072a1b28d3