因此,在我出现内核恐慌后,我一直收到此错误,并决定按照这篇文章进行操作: https://www.geekswarrior.com/2019/07/solved-how-to-fix-kernel-panic-on-linux.html 据我所知,这似乎是 Linux 包处理程序的一个问题,如果不返回此错误,我就无法 sudo apt 获取任何内容,而且如果不返回错误,我也无法执行其他文章所说的修复此错误的命令。
提前感谢任何帮助!
顺便说一句,当它多次说“检查 nproc ...(缓存)是”时,我从消息中删除了它,因为它只是重复并且超出了字符限制。
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-6.2.0-20-generic (6.2.0-20.20) ...
Setting up linux-headers-6.2.0-20-generic (6.2.0-20.20) ...
/etc/kernel/header_postinst.d/dkms:
* dkms: running auto installation service for kernel 6.2.0-20-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
Running the pre_build script:
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... x86_64-linux-gnu-gcc-12
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether x86_64-linux-gnu-gcc-12 accepts -g... yes
checking for x86_64-linux-gnu-gcc-12 option to enable C11 features... none needed
checking how to run the C preprocessor... x86_64-linux-gnu-gcc-12 -E
checking kernel source directory... /usr/src/linux-headers-6.2.0-20-generic
checking kernel build directory... /usr/src/linux-headers-6.2.0-20-generic
checking kernel source version... 6.2.0-20-generic
checking kernel file name for module symbols... Module.symvers
checking for linux/overflow.h... yes
checking for linux/sched/mm.h... yes
checking for linux/sched/task.h... yes
checking for linux/sched/signal.h... yes
checking for linux/nospec.h... yes
checking for linux/bits.h... yes
checking for linux/io-64-nonatomic-lo-hi.h... yes
checking for asm/set_memory.h... yes
checking for asm/fpu/api.h... yes
checking for uapi/linux/sched/types.h... yes
checking for linux/compiler_attributes.h... yes
checking for linux/dma-fence.h... yes
checking for linux/dma-resv.h... yes
checking for linux/mmap_lock.h... yes
checking for linux/pci-p2pdma.h... yes
checking for linux/dma-attrs.h... no
checking for linux/mem_encrypt.h... yes
checking for linux/dma-buf-map.h... no
checking for linux/iosys-map.h... yes
checking for linux/stdarg.h... yes
checking for linux/dma-fence-chain.h... yes
checking for linux/xarray.h... yes
checking for linux/container_of.h... yes
checking for linux/cc_platform.h... yes
checking for linux/processor.h... yes
checking for linux/dma-map-ops.h... yes
checking for drm/drm_backport.h... no
checking for drm/amdgpu_pciid.h... no
checking for drm/drm_auth.h... yes
checking for drm/drm_irq.h... no
checking for drm/drm_connector.h... yes
checking for drm/drm_encoder.h... yes
checking for drm/drm_plane.h... yes
checking for drm/drm_print.h... yes
checking for drm/drm_drv.h... yes
checking for drm/drm_file.h... yes
checking for drm/drm_debugfs.h... yes
checking for drm/drm_ioctl.h... yes
checking for drm/drm_vblank.h... yes
checking for drm/drm_device.h... yes
checking for drm/drm_gem_framebuffer_helper.h... yes
checking for drm/drm_hdcp.h... no
checking for drm/drm_audio_component.h... yes
checking for drm/drm_util.h... yes
checking for drm/drm_atomic_uapi.h... yes
checking for drm/drm_probe_helper.h... yes
checking for drm/drmP.h... no
checking for drm/task_barrier.h... yes
checking for drm/drm_managed.h... yes
checking for drm/amd_asic_type.h... yes
checking for drm/drm_aperture.h... yes
checking for drm/dp/drm_dp_helper.h... no
checking for drm/dp/drm_dp_mst_helper.h... no
checking for drm/display/drm_dp_helper.h... yes
checking for drm/display/drm_dp_mst_helper.h... yes
checking for drm/display/drm_dsc.h... yes
checking for drm/display/drm_dsc_helper.h... yes
checking for drm/display/drm_hdmi_helper.h... yes
checking for drm/display/drm_hdcp_helper.h... yes
checking for drm/display/drm_hdcp.h... yes
checking for drm/display/drm_dp.h... yes
checking for drm/drm_dsc.h... no
checking for linux/pgtable.h... yes
checking for drm/drm_simple_kms_helper.h... yes
checking for drm/drm_damage_helper.h... yes
checking for nproc... yes
checking for supported chips... done
checking for nproc... (cached) yes
checking for module configuration... done
configure: creating ./config.status
config.status: creating config/config.h
Building module:
Cleaning build area...(bad exit status: 2)
make -j16 KERNELRELEASE=6.2.0-20-generic -j16 TTM_NAME=amdttm SCHED_NAME=amd-sched -C /lib/modules/6.2.0-20-generic/build M=/var/lib/dkms/amdgpu/5.18.13-1538762.22.04/build...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/amdgpu-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64)
Consult /var/lib/dkms/amdgpu/5.18.13-1538762.22.04/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
dpkg: error processing package linux-headers-6.2.0-20-generic (--configure):
installed linux-headers-6.2.0-20-generic package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-headers-generic:
linux-headers-generic depends on linux-headers-6.2.0-20-generic; however:
Package linux-headers-6.2.0-20-generic is not configured yet.
dpkg: error processing package linux-headers-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-headers-generic (= 6.2.0.20.20); however:
Package linux-headers-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for linux-image-6.2.0-20-generic (6.2.0-20.20) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 6.2.0-20-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
Running the pre_build script:
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... x86_64-linux-gnu-gcc-12
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether x86_64-linux-gnu-gcc-12 accepts -g... yes
checking for x86_64-linux-gnu-gcc-12 option to enable C11 features... none needed
checking how to run the C preprocessor... x86_64-linux-gnu-gcc-12 -E
checking kernel source directory... /usr/src/linux-headers-6.2.0-20-generic
checking kernel build directory... /usr/src/linux-headers-6.2.0-20-generic
checking kernel source version... 6.2.0-20-generic
checking kernel file name for module symbols... Module.symvers
checking for linux/overflow.h... yes
checking for linux/sched/mm.h... yes
checking for linux/sched/task.h... yes
checking for linux/sched/signal.h... yes
checking for linux/nospec.h... yes
checking for linux/bits.h... yes
checking for linux/io-64-nonatomic-lo-hi.h... yes
checking for asm/set_memory.h... yes
checking for asm/fpu/api.h... yes
checking for uapi/linux/sched/types.h... yes
checking for linux/compiler_attributes.h... yes
checking for linux/dma-fence.h... yes
checking for linux/dma-resv.h... yes
checking for linux/mmap_lock.h... yes
checking for linux/pci-p2pdma.h... yes
checking for linux/dma-attrs.h... no
checking for linux/mem_encrypt.h... yes
checking for linux/dma-buf-map.h... no
checking for linux/iosys-map.h... yes
checking for linux/stdarg.h... yes
checking for linux/dma-fence-chain.h... yes
checking for linux/xarray.h... yes
checking for linux/container_of.h... yes
checking for linux/cc_platform.h... yes
checking for linux/processor.h... yes
checking for linux/dma-map-ops.h... yes
checking for drm/drm_backport.h... no
checking for drm/amdgpu_pciid.h... no
checking for drm/drm_auth.h... yes
checking for drm/drm_irq.h... no
checking for drm/drm_connector.h... yes
checking for drm/drm_encoder.h... yes
checking for drm/drm_plane.h... yes
checking for drm/drm_print.h... yes
checking for drm/drm_drv.h... yes
checking for drm/drm_file.h... yes
checking for drm/drm_debugfs.h... yes
checking for drm/drm_ioctl.h... yes
checking for drm/drm_vblank.h... yes
checking for drm/drm_device.h... yes
checking for drm/drm_gem_framebuffer_helper.h... yes
checking for drm/drm_hdcp.h... no
checking for drm/drm_audio_component.h... yes
checking for drm/drm_util.h... yes
checking for drm/drm_atomic_uapi.h... yes
checking for drm/drm_probe_helper.h... yes
checking for drm/drmP.h... no
checking for drm/task_barrier.h... yes
checking for drm/drm_managed.h... yes
checking for drm/amd_asic_type.h... yes
checking for drm/drm_aperture.h... yes
checking for drm/dp/drm_dp_helper.h... no
checking for drm/dp/drm_dp_mst_helper.h... no
checking for drm/display/drm_dp_helper.h... yes
checking for drm/display/drm_dp_mst_helper.h... yes
checking for drm/display/drm_dsc.h... yes
checking for drm/display/drm_dsc_helper.h... yes
checking for drm/display/drm_hdmi_helper.h... yes
checking for drm/display/drm_hdcp_helper.h... yes
checking for drm/display/drm_hdcp.h... yes
checking for drm/display/drm_dp.h... yes
checking for drm/drm_dsc.h... no
checking for linux/pgtable.h... yes
checking for drm/drm_simple_kms_helper.h... yes
checking for drm/drm_damage_helper.h... yes
checking for nproc... yes
checking for supported chips... done
checking for nproc... (cached) yes
checking for module configuration... done
configure: creating ./config.status
config.status: creating config/config.h
Building module:
Cleaning build area...(bad exit status: 2)
make -j16 KERNELRELEASE=6.2.0-20-generic -j16 TTM_NAME=amdttm SCHED_NAME=amd-sched -C /lib/modules/6.2.0-20-generic/build M=/var/lib/dkms/amdgpu/5.18.13-1538762.22.04/build...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/amdgpu-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64)
Consult /var/lib/dkms/amdgpu/5.18.13-1538762.22.04/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.2.0-20-generic (--configure):
installed linux-image-6.2.0-20-generic package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-headers-6.2.0-20-generic
linux-headers-generic
linux-generic
linux-image-6.2.0-20-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)```