我有两个问题

我有两个问题

VirtualBox 一直在我的计算机上运行,​​直到几天前我在尝试自定义它的主题时修改了 GRUB。我所做的事情开始导致 GRUB 加载到空白的深紫色屏幕上。除非我从 GRUB 菜单中选择高级选项并选择4.10.0-37-generic内核。在这种情况下它会正常加载。

我也可以选择 4.10.0-16-generic。但选择该选项会启动到空白屏幕。

我以为一切都很好,但发现我无法再执行vagrant up,它会自动启动我机器上的 VirtualBox 实例。它抱怨以下错误:

The provider 'virtualbox' that was requested to back the machine default is reporting that it isn't usable on this system. The reason is shown below:

VirtualBox is complaining that the kernel module is not loaded. Please run VBoxManage --version or open the VirtualBox GUI to see the error message which should contain instructions on how to fix this error.

在终端执行后VBoxManage --version我得到:

 WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (4.10.0-37-generic) or it failed to load. Please recompile the kernel module and install it by

 sudo /sbin/vboxconfig

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

执行后sudo /sbin/vboxconfig我得到:

 Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.
 Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.
 Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.
 Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.
 vboxdrv.sh: Stopping VirtualBox services.
 vboxdrv.sh: Building VirtualBox kernel modules.
 This system is not currently set up to build kernel modules (system extensions).

 Running the following commands should set the system up correctly:

 apt-get install linux-headers-4.10.0-37-generic
 (The last command may fail if your system is not fully updated.)
 apt-get install linux-headers-generic
 vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.
 This system is not currently set up to build kernel modules (system extensions).
 There were problems setting up VirtualBox.  To re-start the set-up process, run /sbin/vboxconfig as root.

然后我执行sudo apt-get install linux-headers-4.10.0-37-generic并得到:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package linux-headers-4.10.0-37-generic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'linux-headers-4.10.0-37-generic' has no installation candidate

所以我在谷歌上搜索了那个包裹,基本上没有任何结果。因此,重新阅读上面的错误,我认为我应该更新。所以我执行了``并收到此错误,这被认为是上一个错误的根源:

Hit:12 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu artful InRelease          
Ign:13 http://download.virtualbox.org/virtualbox/debian artful InRelease 
Hit:14 http://download.virtualbox.org/virtualbox/debian zesty InRelease
Err:15 http://download.virtualbox.org/virtualbox/debian artful Release
404  Not Found [IP: 23.215.104.186 80]
Reading package lists... Done
E: The repository 'http://download.virtualbox.org/virtualbox/debian artful Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

然后我执行了sudo apt-get install virtualbox-ext-pack,下面是输出,但对我来说最突出的是这个Module build for kernel 4.10.0-37-generic was skipped since the kernel headers for this kernel does not seem to be installed.

https://gist.github.com/s3w47m88/0e02e95cdfc2adab89951682d9c6a897

我有两个问题

  1. 我需要克服最初的错误。
  2. 我不明白官方 VirtualBox 服务器/URL 怎么会出现这样的故障。这是他们官方文档中指定的内容。我不知道从这里该去哪里。

答案1

可以通过从 VirtualBox 网页下载 VirtualBox 并按照其说明进行操作来解决此问题。

Debian 和 Ubuntu 并不擅长打包最新版本的 VirtualBox。我所知道和使用的其他发行版没有这些问题。

相关内容