当我运行sudo apt upgrade
或其他相关命令时,收到错误E: Sub-process /usr/bin/dpkg returned an error code (1)
。正在执行的完整命令如下所示:
sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 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-headers-6.3.0-kali1-amd64 (6.3.7-1kali1) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.3.0-kali1-amd64.
The kernel is be built without module signing facility, modules won't be signed
Building module:
Cleaning build area...
'make' -j4 KVER=6.3.0-kali1-amd64 KSRC=/lib/modules/6.3.0-kali1-amd64/build.............(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.3.0-kali1-amd64 (x86_64)
Consult /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/make.log for more information.
dkms autoinstall on 6.3.0-kali1-amd64/x86_64 succeeded for realtek-rtl8814au realtek-rtl88xxau
dkms autoinstall on 6.3.0-kali1-amd64/x86_64 failed for 8812au(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.3.0-kali1-amd64 failed!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-6.3.0-kali1-amd64.postinst line 11.
dpkg: error processing package linux-headers-6.3.0-kali1-amd64 (--configure):
installed linux-headers-6.3.0-kali1-amd64 package post-installation script subprocess returned error exit status 1
Setting up linux-image-6.3.0-kali1-amd64 (6.3.7-1kali1) ...
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 6.3.0-kali1-amd64.
The kernel is be built without module signing facility, modules won't be signed
Building module:
Cleaning build area...
'make' -j4 KVER=6.3.0-kali1-amd64 KSRC=/lib/modules/6.3.0-kali1-amd64/build...............(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.3.0-kali1-amd64 (x86_64)
Consult /var/lib/dkms/8812au/5.6.4.2_35491.20191025/build/make.log for more information.
dkms autoinstall on 6.3.0-kali1-amd64/x86_64 succeeded for realtek-rtl8814au realtek-rtl88xxau
dkms autoinstall on 6.3.0-kali1-amd64/x86_64 failed for 8812au(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.3.0-kali1-amd64 failed!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.3.0-kali1-amd64 (--configure):
installed linux-image-6.3.0-kali1-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-6.3.0-kali1-amd64 (= 6.3.7-1kali1); however:
Package linux-image-6.3.0-kali1-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-headers-6.3.0-kali1-amd64
linux-image-6.3.0-kali1-amd64
linux-image-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
感谢任何帮助。
谢谢!
答案1
我也遇到了这个问题,这对我有帮助:
sudo rm /var/lib/dpkg/info/linux-headers-6.3.0-kali1-amd64.*
sudo rm /var/lib/dpkg/info/linux-image-6.3.0-kali1-amd64.*
sudo rm /var/lib/dpkg/info/linux-image-amd64.*
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade