首先说明一点,我是在mac上使用的vagrant,一直用的好好的,今天突然报这个莫名其妙的错误,于是查找解决了一下,顺便还解决了,启动时总输入密码的问题。
错误信息
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
解决方法
终端命令行中执行以下代码
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
Loading VBoxDrv.kext
Loading VBoxUSB.kext
Loading VBoxNetFlt.kext
Loading VBoxNetAdp.kext
等出现以方信息后,在执行 vagrant up 启动,即可。神奇项目都不需要在每次启动输入密码啦。
扫码或搜索:PHP学习网 微信公众号
发送 T
刷新页面 即可 立即解锁 本站全部文章