Mojaveにアップグレードしてから、vagrant up
ができなくなったので、その時の対処方法。
##vagrant upした時のエラー
いつも通りvagrant up
したらこんなエラーが出た。
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
##対処した方法。Virtual MachineのReinstall
brew cask uninstall virtualbox
をしてもエラーが出たので、そのエラーに吐き出された通りにxcode-select --install
を行う。
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
その後、brew cask uninstall virtualbox
をした後、brew cask reinstall virtualbox
を実行。最初からreinstallで大丈夫だったかな?
$ brew cask uninstall virtualbox
==> Tapping caskroom/cask
Cloning into '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask'...
remote: Enumerating objects: 4135, done.
remote: Counting objects: 100% (4135/4135), done.
remote: Compressing objects: 100% (4117/4117), done.
remote: Total 4135 (delta 25), reused 636 (delta 15), pack-reused 0
Receiving objects: 100% (4135/4135), 1.30 MiB | 1.46 MiB/s, done.
Resolving deltas: 100% (25/25), done.
Tapped 0 formulae (4,145 files, 4.2MB)
Error: Cask 'virtualbox' is not installed.
$ brew cask reinstall virtualbox
==> Creating Caskroom at /usr/local/Caskroom
==> We'll set permissions properly so we won't need sudo in the future
Password:
==> Caveats
##問題解決
vagrant up
を行なって動作を確認。問題なしでした。