vagrant up failed,/ dev / vboxnetctl:没有这样的文件或目录

时间:2013-08-09 14:50:06

标签: virtualbox vagrant

可以有用,我发现了这个错误。常见的解决方案是重新安装virtualbox,但还有更好的方法。

解决方案

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

sudo /Library/StartupItems/VirtualBox/VirtualBox start

VirtualBox 4.3 +

在最新版本上,文件(/ Library / StartupItems / VirtualBox / VirtualBox)不存在,因此您需要使用以下命令:

sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

错误

打印:http://d.pr/i/1Bvi

  

执行VBoxManage时出错,这是Vagrant用于控制VirtualBox的CLI。命令和stderr如下所示   命令:[“hostonlyif”,“create”]

     

Stderr:0%...进度状态:NS_ERROR_FAILURE VBoxManage:错误:   无法创建仅限主机的适配器VBoxManage:错误:   VBoxNetAdpCtl:添加新界面时出错:无法打开   / dev / vboxnetctl:没有这样的文件或目录

     

VBoxManage:错误:详细信息:代码NS_ERROR_FAILURE(0x80004005),   组件HostNetworkInterface,接口IHostNetworkInterface   VBoxManage:错误:上下文:“int handleCreate(HandlerArg *,int,int *)”   在VBoxManageHostonly.cpp文件的第68行

关于错误的Vagrant Git问题:https://github.com/mitchellh/vagrant/issues/1671#issuecomment-22304107

7 个答案:

答案 0 :(得分:41)

我正在运行macOS High Sierra 10.13.1和VirtualBox 5.2.2。

这对我有用:

  1. 在系统偏好设置>下授予VirtualBox权限;安全与安全隐私>一般(此要求是macOS High Sierra的新要求)
  2. 打开终端并运行:sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart

答案 1 :(得分:25)

如果您的系统最近更新了内核,则许多人需要再次重新运行vbox设置。 如果是这种情况,则在运行virtualbox start命令时将看到以下消息:

$ sudo /path/to/virtualbox start
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (2.6.32-358.23.2.el6.x86_64) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /etc/init.d/vboxdrv setup

         You will not be able to start VMs until this problem is fixed.

答案 2 :(得分:4)

尝试了所有补救措施,虽然执行了很少的命令但是没有用。 我的Mac(el captain)sort / Library / StartupItems / Vir *中没有任何内容,并且命令失败:

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

重新安装最新的VirtualBox然后运行以下命令帮助我运行VM

sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist

答案 3 :(得分:4)

我在High Sierra上启动虚拟盒时遇到了类似的问题。

  

macOS High Sierra 10.13引入了一项新功能,需要用户批准才能加载新安装的第三方内核扩展(KEXT)。当请求加载用户尚未批准的KEXT时,拒绝加载请求。将KEXT加载失败视为硬错误的应用程序或安装程序将需要更改以处理此新案例。

要解决此问题,您必须在“系统偏好设置”>中手动批准KEXT。安全与安全隐私。

以下是Apple的技术说明:

https://developer.apple.com/library/content/technotes/tn2459/_index.html

答案 4 :(得分:2)

当我收到错误时......

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 HostNetworkInterface,   interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 68 of file    VBoxManageHostonly.cpp

以下为我工作并且没有返回任何错误,我可以成功地使流浪者成功

sudo /Library/StartupItems/VirtualBox/VirtualBox restart

答案 5 :(得分:0)

运行

$ sudo modprobe vboxdrv
$ sudo modprobe vboxnetadp
$ sudo vboxreload

答案 6 :(得分:0)

我被困了一段时间。尝试运行sudo时,我一直看到“找不到命令”:/ Library ..命令。

但是,这确实对我有用:

sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart
相关问题