安装 VirtualBox 后,apt 不知为何损坏了

安装 VirtualBox 后,apt 不知为何损坏了

我在搜索“apt 损坏”问题时没有看到任何相关结果,除了这个话题。我记得设置了 VirtualBox 并以某种方式设法使其工作,但是这个终端输出不断重复,也许还有其他隐藏的后果。

所以我测试了:

sudo dpkg --configure -a

希望它能将 apt 重新初始化为默认参数。但是,它在每个“apt install”命令之后不断重复以下文本。

    Setting up virtualbox-dkms (6.1.16-dfsg-6~ubuntu1.20.04.2) ...
Removing old virtualbox-6.1.16 DKMS files...

------------------------------
Deleting module version: 6.1.16
completely from the DKMS tree.
------------------------------
Done.
Loading new virtualbox-6.1.16 DKMS files...
Building for 5.13.0-52-generic
Building initial module for 5.13.0-52-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.13.0-52-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.16/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
Errors were encountered while processing:
 virtualbox-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

'cat /var/lib/dkms/virtualbox/6.1.16/build/make.log' 的输出是:

    DKMS make.log for virtualbox-6.1.16 for kernel 5.13.0-52-generic (x86_64)
Sat  9 Jul 11:02:23 +04 2022
make: Entering directory '/usr/src/linux-headers-5.13.0-52-generic'
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/linux/SUPDrv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/SUPDrv.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/SUPDrvGip.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/SUPDrvSem.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/SUPDrvTracer.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/SUPLibAll.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/alloc-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/initterm-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/memobj-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/mpnotification-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/powernotification-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/assert-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/alloc-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/initterm-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/memobj-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/memuserkernel-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/mp-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/mpnotification-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/process-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/rtStrFormatKernelAddress-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/semevent-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/semeventmulti-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/semfastmutex-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/semmutex-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/spinlock-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/thread-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/thread2-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/threadctxhooks-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/time-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/timer-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/generic/semspinmutex-r0drv-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/alloc/alloc.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/checksum/crc32.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/checksum/ipv4.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/checksum/ipv6.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/err/RTErrConvertFromErrno.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/err/RTErrConvertToErrno.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/err/errinfo.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/log/log.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/log/logellipsis.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/log/logrel.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/log/logrelellipsis.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/log/logcom.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/log/logformat.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/RTAssertMsg1Weak.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/RTAssertMsg2.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/RTAssertMsg2Add.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/RTAssertMsg2AddWeak.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/RTAssertMsg2AddWeakV.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/RTAssertMsg2Weak.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/RTAssertMsg2WeakV.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/assert.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/handletable.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/handletablectx.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/misc/thread.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/RTStrCat.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/RTStrCopy.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/RTStrCopyEx.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/RTStrCopyP.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/RTStrNCmp.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/RTStrNLen.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/stringalloc.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/strformat.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/strformatnum.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/strformatrt.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/strformattype.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/strprintf.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/string/strtonum.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/table/avlpv.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/time/time.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/r0drv/linux/RTLogWriteDebugger-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTAssertShouldPanic-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTLogWriteStdErr-stub-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTLogWriteStdOut-stub-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTLogWriteUser-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTMpGetArraySize-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTMpGetCoreCount-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTSemEventWait-2-ex-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTSemEventWaitNoResume-2-ex-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTSemEventMultiWait-2-ex-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTSemEventMultiWaitNoResume-2-ex-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/RTTimerCreate-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/errvars-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/mppresent-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/generic/uuid-generic.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/VBox/log-vbox.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/common/alloc/heapsimple.o
  LD [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxdrv/vboxdrv.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/linux/VBoxNetFlt-linux.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/VBoxNetFlt.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/SUPR0IdcClient.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/SUPR0IdcClientComponent.o
  CC [M]  /var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/linux/SUPR0IdcClient-linux.o
/var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/linux/VBoxNetFlt-linux.c: In function ‘vboxNetFltNeedsLinkState’:
/var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/linux/VBoxNetFlt-linux.c:1761:47: error: dereferencing pointer to incomplete type ‘const struct ethtool_ops’
 1761 |     if (pDev->ethtool_ops && pDev->ethtool_ops->get_drvinfo)
      |                                               ^~
/var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/linux/VBoxNetFlt-linux.c:1763:32: error: storage size of ‘Info’ isn’t known
 1763 |         struct ethtool_drvinfo Info;
      |                                ^~~~
/var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/linux/VBoxNetFlt-linux.c:1766:20: error: ‘ETHTOOL_GDRVINFO’ undeclared (first use in this function)
 1766 |         Info.cmd = ETHTOOL_GDRVINFO;
      |                    ^~~~~~~~~~~~~~~~
/var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/linux/VBoxNetFlt-linux.c:1766:20: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/linux/VBoxNetFlt-linux.c:1763:32: warning: unused variable ‘Info’ [-Wunused-variable]
 1763 |         struct ethtool_drvinfo Info;
      |                                ^~~~
make[2]: *** [scripts/Makefile.build:281: /var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1
make[1]: *** [scripts/Makefile.build:524: /var/lib/dkms/virtualbox/6.1.16/build/vboxnetflt] Error 2
make: *** [Makefile:1879: /var/lib/dkms/virtualbox/6.1.16/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.13.0-52-generic'

我的“软件和更新”中又出现了错误。当我尝试使用新设置进行保存时出现此错误。

相关内容