vagrant up 失败,/dev/vboxnetctl: 没有那个文件或目录 [英] vagrant up failed, /dev/vboxnetctl: no such file or directory
问题描述
很有用,我发现了这个错误.常见的解决方案是重新安装 virtualbox,但有更好的方法.
Can be useful, I found this error. The common solution is reinstall virtualbox but there are a better way.
解决方案
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
或
sudo /Library/StartupItems/VirtualBox/VirtualBox start
VirtualBox 4.3+
在最近的版本中,文件 (/Library/StartupItems/VirtualBox/VirtualBox) 不存在,因此您需要使用以下命令:
On recents versions, the file (/Library/StartupItems/VirtualBox/VirtualBox) don't exists, so you need to use the command below:
sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist
<小时>
错误
执行 VBoxManage
时出错,这是 Vagrant 用于控制 VirtualBox 的 CLI.命令和标准错误如下所示命令:["hostonlyif", "create"]
There was on error while executing
VBoxManage
, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below Command: ["hostonlyif", "create"]
Stderr:0%...进度状态:NS_ERROR_FAILURE VBoxManage:错误:无法创建仅主机适配器 VBoxManage:错误:VBoxNetAdpCtl:添加新界面时出错:无法打开/dev/vboxnetctl: 没有那个文件或目录
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:错误:详细信息:代码 NS_ERROR_FAILURE (0x80004005),组件 HostNetworkInterface,接口 IHostNetworkInterfaceVBoxManage:错误:上下文:int handleCreate(HandlerArg*, int, int*)"在文件 VBoxManageHostonly.cpp 的第 68 行
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 68 of file VBoxManageHostonly.cpp
Vagrant Git 关于错误的问题:https://github.com/mitchellh/vagrant/issues/1671#issuecomment-22304107
Vagrant Git issue about the error: https://github.com/mitchellh/vagrant/issues/1671#issuecomment-22304107
推荐答案
我运行的是 macOS High Sierra 10.13.1 和 VirtualBox 5.2.2.
I'm running macOS High Sierra 10.13.1 and VirtualBox 5.2.2.
- 在系统偏好设置下授予 VirtualBox 权限 >安全与隐私 >常规(此请求是 macOS High Sierra 的新请求)
- 打开终端并运行:
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh";重启
这篇关于vagrant up 失败,/dev/vboxnetctl: 没有那个文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!