Virtualbox Debian9-升级virtaulbox在';无法卸载模块vboxdrv.&x27;

Virtualbox Debian9-升级virtaulbox在';无法卸载模块vboxdrv.&x27;,virtualbox,upgrade,Virtualbox,Upgrade,我正在尝试更新debian 9,virtualbox无法升级。。。 我得到了一个错误: vboxdrv.sh: failed: Cannot unload module vboxdrv. 有人知道吗 $ apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following

我正在尝试更新debian 9,virtualbox无法升级。。。 我得到了一个错误:

vboxdrv.sh: failed: Cannot unload module vboxdrv.
有人知道吗

$ apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  virtualbox-5.1
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/66.9 MB of archives.
After this operation, 6,144 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 261193 files and directories currently installed.)
Preparing to unpack .../virtualbox-5.1_5.1.36-122089~Debian~stretch_amd64.deb ...
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
dpkg: error processing archive /var/cache/apt/archives/virtualbox-5.1_5.1.36-122089~Debian~stretch_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
A copy of VirtualBox is currently running.  Please close it and try again.
Please note that it can take up to ten seconds for VirtualBox to finish running.
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: failed: Cannot unload module vboxdrv.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
Errors were encountered while processing:
 /var/cache/apt/archives/virtualbox-5.1_5.1.36-122089~Debian~stretch_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

在您发布的错误消息中可以看到:

A copy of VirtualBox is currently running.  Please close it and try again.
Please note that it can take up to ten seconds for VirtualBox to finish running.

你试过了吗?

是的,我试过了,但由于一些无头虚拟机,它仍然在后台运行。。。。解决方案是关闭所有虚拟机并关闭VirtualBox。现在一切都正常了,您可能只关闭了VirtualBox的GUI,它不会阻止无头虚拟机。在这方面,错误信息确实有点误导。