vagrant up
在内核为 5.8.0-36-generic 的 Ubuntu 20.04 上失败
我该如何修复此问题?
这是我当前调试的状态:
guettli@yoga15:~/projects/yourfirm$ vagrant up
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 installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
instructions on how to fix this error.
guettli@yoga15:~/projects/yourfirm$ VBoxManage --version
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.
6.1.10_Ubuntur138449
guettli@yoga15:~/projects/yourfirm$ LANG=C sudo dpkg-reconfigure virtualbox-dkms
------------------------------
Deleting module version: 6.1.10
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-6.1.10 DKMS files...
Building for 5.8.0-36-generic
Building initial module for 5.8.0-36-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/virtualbox-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.8.0-36-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.10/build/make.log for more information.
guettli@yoga15:~/projects/yourfirm$ cat /var/lib/dkms/virtualbox/6.1.10/build/make.log
DKMS make.log for virtualbox-6.1.10 for kernel 5.8.0-36-generic (x86_64)
Mon Jan 11 11:50:25 CET 2021
make: Entering directory '/usr/src/linux-headers-5.8.0-36-generic'
CC [M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.o
CC [M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/SUPDrv.o
CC [M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/SUPDrvGip.o
CC [M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/SUPDrvSem.o
CC [M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/SUPDrvTracer.o
In file included from ./include/asm-generic/percpu.h:7,
from ./arch/x86/include/asm/percpu.h:556,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:78,
from ./include/linux/spinlock.h:51,
from /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/../SUPDrvInternal.h:79,
from /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:32:
/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c: In function 'supdrvOSChangeCR4':
/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:38: error: 'cpu_tlbstate' undeclared (first use in this function); did you mean 'cpuhp_state'?
760 | RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);
| ^~~~~~~~~~~~
./include/linux/percpu-defs.h:318:9: note: in definition of macro '__pcpu_size_call_return'
318 | typeof(variable) pscr_ret__; \
| ^~~~~~~~
/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:24: note: in expansion of macro 'this_cpu_read'
760 | RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);
| ^~~~~~~~~~~~~
/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:38: note: each undeclared identifier is reported only once for each function it appears in
760 | RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);
| ^~~~~~~~~~~~
./include/linux/percpu-defs.h:318:9: note: in definition of macro '__pcpu_size_call_return'
318 | typeof(variable) pscr_ret__; \
| ^~~~~~~~
/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.c:760:24: note: in expansion of macro 'this_cpu_read'
760 | RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);
| ^~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:290: /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:519: /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv] Error 2
make: *** [Makefile:1780: /var/lib/dkms/virtualbox/6.1.10/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.8.0-36-generic'
https://www.google.com/search?q=%27cpu_tlbstate%27+undeclared
https://www.virtualbox.org/ticket/19644
这些软件包都是最新的:
guettli@yoga15:~/projects/yourfirm$ dpkg -l virtualbox
ii virtualbox 6.1.10-dfsg-1~ubuntu1.20.04.1 amd64 x86 virtualization solution - base binaries
guettli@yoga15:~/projects/yourfirm$ dpkg -l virtualbox-dkms
ii virtualbox-dkms 6.1.10-dfsg-1~ubuntu1.20.04.1 amd64 x86 virtualization solution - kernel module sources for dkms
据我所知 Virtualbox 6.1.16 可以解决这个问题,但是目前还不可用:
答案1
您可以从 Oracle 存储库安装 Virtualbox 6.1.16,请参阅Virtualbox 网站。
更直接的指南是这里。