将 Ubuntu 20.04 升级到 23.04 时出错,安装了 linux-headers-6.2.0-33-generic 包

将 Ubuntu 20.04 升级到 23.04 时出错,安装了 linux-headers-6.2.0-33-generic 包

安装了 linux-headers-6.2.0-33-generic 包安装后脚本子进程返回错误退出状态 1

在此处输入图片描述

升级后显示如下:

sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  acpi-support acpid apturl apturl-common gcc-11-base gcc-12-base:i386 gedit
  gedit-common genisoimage gir1.2-gtksource-4 gir1.2-gweather-3.0
  gir1.2-nma-1.0 gir1.2-snapd-1 gnome-bluetooth-common gnome-todo
  gnome-todo-common liba52-0.7.4 libabsl20210324 libasan6 libatk1.0-data
  libbpf0 libcamel-1.2-63 libcolord-gtk1 libcupsfilters1 libdazzle-1.0-0
  libdazzle-common libdns-export1110 libdvdread8 libebackend-1.2-10
  libebook-1.2-20 libebook-contacts-1.2-3 libecal-2.0-1 libedata-book-1.2-26
  libedata-cal-2.0-1 libedataserver-1.2-26 libedataserverui-1.2-3 libflac8
  libflac8:i386 libfontembed1 libgcc-11-dev libgeocode-glib0
  libgnome-bluetooth13 libgnome-todo libgssdp-1.2-0 libgtksourceview-4-0
  libgtksourceview-4-common libgupnp-1.2-1 libgweather-3-16 libgweather-common
  libicu70:i386 libisc-export1105 libldap-2.5-0 libldap-2.5-0:i386
  libmessaging-menu0 libmozjs-91-0 libmpdec3 libmpeg2-4
  libnautilus-extension1a libnetpbm10 libopencore-amrnb0 libopencore-amrwb0
  libpcre3 libpcre3:i386 libperl5.34 libperl5.34:i386 libpoppler118
  libpoppler118:i386 libprotobuf23 libpython3.10 libpython3.10-minimal
  libpython3.10-stdlib libqpdf28 libreoffice-ogltrans libreoffice-pdfimport
  libreoffice-style-breeze librest-0.7-0 librygel-core-2.6-2 librygel-db-2.6-2
  librygel-renderer-2.6-2 librygel-server-2.6-2 libsidplay1v5 libsnapd-glib1
  libspeexdsp1 libtsan0 libvncserver1 libwacom-bin
  linux-hwe-6.2-headers-6.2.0-33 linux-hwe-6.2-headers-6.2.0-34 netpbm
  perl-modules-5.34 python3-gi-cairo python3-ldb python3-pymacaroons
  python3-rfc3339 python3-talloc python3-tz python3.10 python3.10-minimal
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
  gcc-12-base gcc-12-base:i386 libgfortran5 libsgutils2-2
  ubuntu-drivers-common
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-6.2.0-33-generic (6.2.0-33.33+1) ...
Setting up linux-headers-6.2.0-33-generic (6.2.0-33.33) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.2.0-33-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Building module:
Cleaning build area...
/usr/src/realtek-rtl8814au-5.8.5.1~git20230614.8a1908d/dkms-make.sh...(bad exit 
status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/realtek-rtl8814
au-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-33-generic (x86_64)
Consult /var/lib/dkms/realtek-rtl8814au/5.8.5.1~git20230614.8a1908d/build/make.l
og for more information.
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Building module:
Cleaning build area...
'make' -j4 KVER=6.2.0-33-generic KSRC=/lib/modules/6.2.0-33-generic/build...(bad
 exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/realtek-rtl88xx
au-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-33-generic (x86_64)
Consult /var/lib/dkms/realtek-rtl88xxau/5.6.4.2~git20230703.9dc4a4c/build/make.l
og for more information.
dkms autoinstall on 6.2.0-33-generic/x86_64 failed for realtek-rtl8814au(10) rea
ltek-rtl88xxau(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
 * dkms: autoinstall for kernel 6.2.0-33-generic
   ...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
dpkg: error processing package linux-headers-6.2.0-33-generic (--configure):
 installed linux-headers-6.2.0-33-generic package post-installation script subpr
ocess returned error exit status 1
Processing triggers for linux-image-6.2.0-33-generic (6.2.0-33.33+1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.2.0-33-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Building module:
Cleaning build area...
/usr/src/realtek-rtl8814au-5.8.5.1~git20230614.8a1908d/dkms-make.sh...(bad exit 
status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/realtek-rtl8814
au-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-33-generic (x86_64)
Consult /var/lib/dkms/realtek-rtl8814au/5.8.5.1~git20230614.8a1908d/build/make.l
og for more information.
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Building module:
Cleaning build area...
'make' -j4 KVER=6.2.0-33-generic KSRC=/lib/modules/6.2.0-33-generic/build...(bad
 exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/realtek-rtl88xx
au-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-33-generic (x86_64)
Consult /var/lib/dkms/realtek-rtl88xxau/5.6.4.2~git20230703.9dc4a4c/build/make.l
og for more information.
dkms autoinstall on 6.2.0-33-generic/x86_64 failed for realtek-rtl8814au(10) rea
ltek-rtl88xxau(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
 * dkms: autoinstall for kernel 6.2.0-33-generic
   ...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.2.0-33-generic (--configure):
 installed linux-image-6.2.0-33-generic package post-installation script subproc
ess returned error exit status 1
Errors were encountered while processing:
 linux-headers-6.2.0-33-generic
 linux-image-6.2.0-33-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

有几种方法可以解决这个问题,但我不确定:

您可以尝试使用命令 重新配置软件包sudo dpkg-reconfigure linux-headers-6.2.0-33-generic。这将再次运行安装后脚本并可能修复错误。您可以尝试使用命令 和 删除并重新安装软件包。sudo apt remove --purge linux-headers-6.2.0-33-genericsudo apt install linux-headers-6.2.0-33-generic将删除软件包文件和配置,然后再次安装它们。您可以尝试使用命令 修复任何损坏的依赖关系sudo apt -f install。这将尝试更正任何具有未满足的依赖关系或未完全安装的软件包。

相关内容