如何解决在MacOS上运行流浪汉的错误

时间:2018-09-12 13:21:44

标签: macos vagrant

我正在使用vagrant设置ubuntu虚拟机。我已经安装了virtualbox和vagrant。当我“无所事事”运行时,遇到以下错误:

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "268774c3-ac5e-4b96-b17e-99cc4c66b27f", "--type", "headless"]

Stderr: VBoxManage: error: The virtual machine 'profiles-rest-api_default_1536758322698_53584' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

经过更多调查后,我发现VMbox也并非从GUI启动,并给出以下错误:

Failed to open a session for the virtual machine profiles-rest-api.

The virtual machine 'profiles-rest-api' has terminated unexpectedly during startup with exit code 1 (0x1).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {85cd948e-a71f-4289-281e-0ca7ad48cd89}

当我尝试使用brew cask install virtualbox安装它时,出现以下错误:

错误:执行时失败; /usr/bin/sudo -E -- env LOGNAME=username USER=username USERNAME=username /usr/sbin/installer -pkg /usr/local/Caskroom/virtualbox/5.2.18,124319/VirtualBox.pkg -target /以1退出

3 个答案:

答案 0 :(得分:3)

您是否正在使用Mojave?有一个已知问题。

执行以下操作:

  1. Update VirtualBox至最新版本。我不确定哪一种有效,但是5.2.10不适用于我,而5.2.18有效。
  2. 根据this thread
  3. ,授予iTerm,Terminal或用于引导框“全盘访问”和“可访问性”的工具
  4. 重新启动iTerm
  5. vagrant up

祝你好运!

答案 1 :(得分:0)

brew cask install virtualbox
# https://support.intego.com/hc/en-us/articles/115001273551-Intego-Extensions-Blocked-in-macOS
# Click "Allow" per 2. Click the 'Allow' Button
brew cask install virtualbox

答案 2 :(得分:0)

如果您是 mac os 用户,请检查您的 macbook 设置 --> 安全性

默认情况下,它会阻止从 oracle 运行的应用程序,只需允许并批准它,这个问题就没有了。

enter image description here