无法在 16.04 上安装 virtualbox

无法在 16.04 上安装 virtualbox

下载的 deb 来自这里并安装它,但出现以下错误:

$ sudo dpkg -i virtualbox-5.0_5.0.20-106931~Ubuntu~xenial_amd64.deb 
Selecting previously unselected package virtualbox-5.0.
(Reading database ... 256316 files and directories currently installed.)
Preparing to unpack virtualbox-5.0_5.0.20-106931~Ubuntu~xenial_amd64.deb ...
Unpacking virtualbox-5.0 (5.0.20-106931~Ubuntu~xenial) ...
Setting up virtualbox-5.0 (5.0.20-106931~Ubuntu~xenial) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSERROR (dkms apport): unable to determine source package for virtualbox-5.0
Error! Bad return status for module build on kernel: 4.13.0-26-generic (x86_64)
Consult /var/lib/dkms/vboxhost/5.0.20/build/make.log for more information.
 ...failed!
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
  (Look at /var/log/vbox-install.log to find out what went wrong)
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...

更新

$ VBoxManage --version
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (4.13.0-26-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.14r112924
$ sudo /sbin/vboxconfig
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.

如何修复?谢谢

相关内容