web-dev-qa-db-ja.com

Ubuntu 16.04.2 LTSでvirtualboxを起動できません

すでにvirtualboxを適切にインストールして使用しています。ただし、昨日以来、virtualboxを起動するとこのエラーが発生します。

root@batzi-xubuntu:/home/batzinger# virtualbox
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-dkms package and the appropriate
headers, most likely linux-headers-generic.

You will not be able to start VMs until this problem is fixed.
Qt WARNING: Qt: Session management error: Authentication Rejected, reason : 
None of the authentication protocols specified are supported and Host-based authentication failed

私も この質問 の答えに従いましたが、何も変わりませんでした。 Sudo apt-get --reinstall install virtualbox-dkmsを実行した後、次の出力が表示されます。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-64 linux-headers-4.4.0-64-generic linux-image-4.4.0-64-generic linux-image-extra-4.4.0-64-generic linux-signed-image-4.4.0-64-generic
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/622 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 240869 files and directories currently installed.)
Preparing to unpack .../virtualbox-dkms_5.0.32-dfsg-0ubuntu1.16.04.2_all.deb ...

------------------------------
Deleting module version: 5.0.32
completely from the DKMS tree.
------------------------------
Done.
Unpacking virtualbox-dkms (5.0.32-dfsg-0ubuntu1.16.04.2) over (5.0.32-dfsg-0ubuntu1.16.04.2) ...
Setting up virtualbox-dkms (5.0.32-dfsg-0ubuntu1.16.04.2) ...
Loading new virtualbox-5.0.32 DKMS files...
Building only for 4.4.0-71-generic
Building initial module for 4.4.0-71-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/virtualbox-dkms.0.crash'
Error! Bad return status for module build on kernel: 4.4.0-71-generic (x86_64)
Consult /var/lib/dkms/virtualbox/5.0.32/build/make.log for more information.
Job for virtualbox.service failed because the control process exited with error code. See "systemctl status virtualbox.service" and "journalctl -xe" for details.
invoke-rc.d: initscript virtualbox, action "restart" failed.
● virtualbox.service - LSB: VirtualBox Linux kernel module
   Loaded: loaded (/etc/init.d/virtualbox; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Di 2017-04-04 19:55:06 CEST; 10ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2793 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)

Apr 04 19:55:06 batzi-xubuntu systemd[1]: Starting LSB: VirtualBox Linux kernel module...
Apr 04 19:55:06 batzi-xubuntu virtualbox[2793]:  * Loading VirtualBox kernel modules...
Apr 04 19:55:06 batzi-xubuntu virtualbox[2793]:  * No suitable module for running kernel found
Apr 04 19:55:06 batzi-xubuntu virtualbox[2793]:    ...fail!
Apr 04 19:55:06 batzi-xubuntu systemd[1]: virtualbox.service: Control process exited, code=exited status=1
Apr 04 19:55:06 batzi-xubuntu systemd[1]: Failed to start LSB: VirtualBox Linux kernel module.
Apr 04 19:55:06 batzi-xubuntu systemd[1]: virtualbox.service: Unit entered failed state.
Apr 04 19:55:06 batzi-xubuntu systemd[1]: virtualbox.service: Failed with result 'exit-code'.

さて、誰かが別のアイデアを持っているのでしょうか?

編集:uname -rの出力は4.4.0-66-genericです。 dkms statusvirtualbox, 5.0.32: addedです。

root@batzi-xubuntu:/# dpkg -l *virtualbox* | grep ii
ii  virtualbox                     5.0.32-dfsg-0ubuntu1.16.04.2 AMD64        x86 virtualization solution - base binaries
ii  virtualbox-dkms                5.0.32-dfsg-0ubuntu1.16.04.2 all          x86 virtualization solution - kernel module sources for dkms
ii  virtualbox-guest-utils         5.0.32-dfsg-0ubuntu1.16.04.2 AMD64        x86 virtualization solution - non-X11 guest utilities
ii  virtualbox-guest-x11           5.0.32-dfsg-0ubuntu1.16.04.2 AMD64        x86 virtualization solution - X11 guest utilities
ii  virtualbox-qt                  5.0.32-dfsg-0ubuntu1.16.04.2 AMD64        x86 virtualization solution - Qt based user interface
ii  virtualbox-source              5.0.32-dfsg-0ubuntu1.16.04.2 all          x86 virtualization solution - kernel module source

secure bootは無効です

cat /var/lib/dkms/virtualbox/5.0.32/build/make.logの出力:

DKMS make.log for virtualbox-5.0.32 for kernel 4.4.0-71-generic (x86_64)
Di 4. Apr 19:54:59 CEST 2017
make: Entering directory '/usr/src/linux-headers-4.4.0-71-generic'
Arch/x86/Makefile:133: stack-protector enabled but compiler support broken
Arch/x86/Makefile:148: CONFIG_X86_X32 enabled but no binutils support
Makefile:693: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
make: execvp: gcc: Permission denied
  LD      /var/lib/dkms/virtualbox/5.0.32/build/built-in.o
  LD      /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/built-in.o
  CC [M]  /var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/linux/SUPDrv-linux.o
/bin/sh: 1: gcc: Permission denied
scripts/Makefile.build:258: recipe for target '/var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/linux/SUPDrv-linux.o' failed
make[2]: *** [/var/lib/dkms/virtualbox/5.0.32/build/vboxdrv/linux/SUPDrv-linux.o] Error 126
scripts/Makefile.build:403: recipe for target '/var/lib/dkms/virtualbox/5.0.32/build/vboxdrv' failed
make[1]: *** [/var/lib/dkms/virtualbox/5.0.32/build/vboxdrv] Error 2
Makefile:1420: recipe for target '_module_/var/lib/dkms/virtualbox/5.0.32/build' failed
make: *** [_module_/var/lib/dkms/virtualbox/5.0.32/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.4.0-71-generic
4
tux

terminal...

Sudo apt-get update                          # update databases
Sudo apt-get install linux-headers-generic   # install kernel headers

Sudo dkms build virtualbox/5.0.32 -k "$(uname -r)/$(uname -p)"    # build VB kernel modules
Sudo dkms install virtualbox/5.0.32 -k "$(uname -r)/$(uname -p)"  # install VB kernel modules
dkms status    # should show "virtualbox, 5.0.32: installed"
reboot

virtualbox...

install Virtualbox expansion pack
install guest-additions in guest VM
2
heynnema