gpt4 book ai didi

ubuntu - 为什么 virtualbox 无法在 Ubuntu 20.04 上安装

转载 作者:行者123 更新时间:2023-12-03 16:47:04 27 4
gpt4 key购买 nike

我正在尝试安装 virtualbox。我以前安装过它,它工作。今天我尝试添加另一个虚拟机,它开始提示 dkms 出现问题,所以我尝试清除并安装所有内容,但失败了。

$  sudo apt install virtualbox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
dkms libgsoap-2.8.91 libqt5opengl5 libsdl1.2debian libvncserver1 virtualbox-dkms virtualbox-qt
Suggested packages:
我无法在不跳过某些输出的情况下提交我的问题
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.
dpkg: error processing package virtualbox-dkms (--configure):
installed virtualbox-dkms package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of virtualbox:
virtualbox depends on virtualbox-dkms (>= 6.1.10-dfsg-1~ubuntu1.20.04.1) | virtualbox-source (>= 6.1.10-dfsg-1~u
buntu1.20.04.1) | virtualbox-modules; however:
Package virtualbox-dkms is not configured yet.
Package virtualbox-source is not installed.
Package virtualbox-modules is not installed.
Package virtualbox-dkms which provides virtualbox-modules is not configured yet.

dpkg: error processing package virtualbox (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of virtualbox-qt:
virtualbox-qt depends on virtualbox (= 6.1.10-dfsg-1~ubuntu1.20.04.1); however:
Package virtualbox is not configured yet.

dpkg: error processing package virtualbox-qt (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
No ap
port report written because the error message indicates it's a follow-up error from a previous failure.
Processing
triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
Processing triggers for systemd (245.4-4ubuntu3.3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for shared-mime-info (1.15-1) ...
Errors were encountered while processing:
virtualbox-dkms
virtualbox
virtualbox-qt
E: Sub-process /usr/bin/dpkg returned an error code (1)
dkms 错误

$ cat /var/lib/dkms/virtualbox/6.1.10/build/make.log DKMS make.logfor virtualbox-6.1.10 for kernel 5.8.0-36-generic (x86_64) Tue 12 Jan12:40:32 GMT 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 CC[M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/SUPLibAll.o CC[M] /var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/alloc-r0drv.oCC [M]/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/initterm-r0drv.o
CC [M]/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/memobj-r0drv.o
CC [M]/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/mpnotification-r0drv.oCC [M]/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/powernotification-r0drv.oCC [M]/var/lib/dkms/virtualbox/6.1.10/build/vboxdrv/r0drv/linux/assert-r0drv-linux.oIn 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: Infunction ‘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 youmean ‘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 | RTCCUINTREGuOld = 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 eachfunction 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 | RTCCUINTREGuOld = 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'

最佳答案

有同样的问题,但终于解决了!!!
通过完全删除 Virtualbox 并重新安装它。
尝试降低内核,但这对我不起作用
$sudo apt-get purge "^virtualbox-.*"
$sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get clean
然后从此链接下载最新的virtualbox版本,适用于ubuntu 20.04

https://www.virtualbox.org/wiki/Linux_Downloads


我尝试了许多其他解决方案,没有一个对我有用。

关于ubuntu - 为什么 virtualbox 无法在 Ubuntu 20.04 上安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65684245/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com