运行“vagrant up”时出现的问题

运行“vagrant up”时出现的问题

当我执行“vagrant up”时,我看到以下错误消息:

% vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 3000 => 3333 (adapter 1)
[default] -- 5678 => 5678 (adapter 1)
[default] -- 27017 => 27017 (adapter 1)
[default] -- 28017 => 28017 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

我尝试从 VirtualBox UI 启动虚拟机,但收到以下错误:

其中:supR3HardenedMainInitRuntime 什么:4 VERR_VM_DRIVER_VERSION_MISMATCH (-1912) - 安装的支持驱动程序与用户的版本不匹配。

这个错误似乎很常见,所以网上有很多关于如何修复它的建议。以下是我之前尝试过的一些命令:

sudo apt-get update
sudo apt-get upgrade
sudo dpkg-reconfigure virtualbox-dkms
sudo dpkg-reconfigure virtualbox

但它没有帮助。

以下是我使用的软件版本:

% VBoxManage --version
4.3.34_Ubuntur104062
% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty

答案1

我尝试重新安装 Vagrant 和 VirtualBox,但没有帮助。

只有在重新安装 Ubuntu 并以以下方式安装 VirtualBox 和 Vagrant 后,我​​才能够运行我的 VM:

sudo apt-get update
sudo apt-get -y install virtualbox-4.3
sudo apt-get -y install virtualbox-dkms

sudo apt-get -y install vagrant

相关内容