LoginSignup
19
14

More than 5 years have passed since last update.

macOS MojaveでVagrantが使えなくなった時の対処法

Posted at

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を行なって動作を確認。問題なしでした。

19
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
14