apt-get upgrade/install(任何内容)因错误退出

apt-get upgrade/install(任何内容)因错误退出

上次之后apt-get update我再也无法安装任何东西。

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:
  g++-12 grub-pc-bin libnvidia-cfg1-530 libnvidia-common-530 libnvidia-compute-530 libnvidia-decode-530 libnvidia-encode-530 libnvidia-extra-530 libnvidia-fbc1-530 libnvidia-gl-530
  nvidia-compute-utils-530 nvidia-kernel-source-530 nvidia-utils-530 xserver-xorg-video-nvidia-530
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
  linux-modules-nvidia-530-generic-hwe-22.04 linux-signatures-nvidia-6.2.0-24-generic
0 upgraded, 0 newly installed, 0 to remove and 2 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] 
Setting up nvidia-dkms-535 (535.54.03-0ubuntu0.23.04.2) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
Removing old nvidia-535.54.03 DKMS files...
Deleting module nvidia-535.54.03 completely from the DKMS tree.
Loading new nvidia-535.54.03 DKMS files...
Building for 6.2.0-24-generic
Building for architecture x86_64
Building initial module for 6.2.0-24-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/nvidia-dkms-535.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-24-generic (x86_64)
Consult /var/lib/dkms/nvidia/535.54.03/build/make.log for more information.
dpkg: error processing package nvidia-dkms-535 (--configure):
 installed nvidia-dkms-535 package post-installation script subprocess returned error exit status 10
dpkg: dependency problems prevent configuration of nvidia-driver-535:
 nvidia-driver-535 depends on nvidia-dkms-535 (<= 535.54.03-1); however:
  Package nvidia-dkms-535 is not configured yet.
 nvidia-driver-535 depends on nvidia-dkms-535 (>= 535.54.03); however:
  Package nvidia-dkms-535 is not configured yet.

dpkg: error processing package nvidia-driver-535 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-driver-530:
 nvidia-driver-530 depends on nvidia-driver-535; however:
  Package nvidia-driver-535 is not configured yet.

dpkg: error processing package nvidia-driver-530 (--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 fr
om a previous failure.
                      Processing triggers for initramfs-tools (0.142ubuntu2) ...
update-initramfs: Generating /boot/initrd.img-6.2.0-24-generic
Errors were encountered while processing:
 nvidia-dkms-535
 nvidia-driver-535
 nvidia-driver-530
E: Sub-process /usr/bin/dpkg returned an error code (1)

建议查看的错误之一/var/lib/dkms/nvidia/535.54.03/build/make.log

DKMS make.log for nvidia-535.54.03 for kernel 6.2.0-24-generic (x86_64)
Mon Jul  3 04:50:51 PM CEST 2023
make[1]: Entering directory '/usr/src/linux-headers-6.2.0-24-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0
  You are using:           Ubuntu clang version 15.0.7
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia/535.54.03/build need-builtin=1 need-modorder=1 
  printf '%s
'   nvidia/nv.o nvidia/nv-pci.o nvidia/nv-dmabuf.o nvidia/nv-nano-timer.o nvidia/nv-acpi.o nvidia/nv-cray.o nvidia/nv-dma.o nvidia/nv-i2c.o nvidia/nv-mmap.o nvidia/nv-p2p.o nvidia/nv-pat.o nvidia/nv-procfs.o nvidia/nv-usermap.o nvidia/nv-vm.o nvidia/nv-vtophys.o nvidia/os-interface.o nvidia/os-mlock.o nvidia/os-pci.o nvidia/os-registry.o nvidia/os-usermap.o nvidia/nv-modeset-interface.o nvidia/nv-pci-table.o nvidia/nv-kthread-q.o nvidia/nv-memdbg.o nvidia/nv-ibmnpu.o nvidia/nv-report-err.o nvidia/nv-rsync.o nvidia/nv-msi.o nvidia/nv-caps.o nvidia/nv-frontend.o nvidia/nv_uvm_interface.o nvidia/nvlink_linux.o nvidia/nvlink_caps.o nvidia/linux_nvswitch.o nvidia/procfs_nvswitch.o nvidia/i2c_nvswitch.o nvidia/nv-kernel.o | awk '!x[$0]++ { print("/var/lib/dkms/nvidia/535.54.03/build/"$0) }' > /var/lib/dkms/nvidia/535.54.03/build/nvidia.mod
  ln -sf /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-kernel.o_binary /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-kernel.o
  printf '%s
'   nvidia-uvm/uvm_ats_sva.o nvidia-uvm/uvm_conf_computing.o nvidia-uvm/uvm_sec2_test.o nvidia-uvm/uvm_maxwell_sec2.o nvidia-uvm/uvm_hopper_sec2.o nvidia-uvm/uvm_common.o nvidia-uvm/uvm_linux.o nvidia-uvm/nvstatus.o nvidia-uvm/nvCpuUuid.o nvidia-uvm/nv-kthread-q.o nvidia-uvm/nv-kthread-q-selftest.o nvidia-uvm/uvm.o nvidia-uvm/uvm_tools.o nvidia-uvm/uvm_global.o nvidia-uvm/uvm_gpu.o nvidia-uvm/uvm_gpu_isr.o nvidia-uvm/uvm_procfs.o nvidia-uvm/uvm_va_space.o nvidia-uvm/uvm_va_space_mm.o nvidia-uvm/uvm_gpu_semaphore.o nvidia-uvm/uvm_mem.o nvidia-uvm/uvm_rm_mem.o nvidia-uvm/uvm_channel.o nvidia-uvm/uvm_lock.o nvidia-uvm/uvm_hal.o nvidia-uvm/uvm_range_tree.o nvidia-uvm/uvm_rb_tree.o nvidia-uvm/uvm_range_allocator.o nvidia-uvm/uvm_va_range.o nvidia-uvm/uvm_va_policy.o nvidia-uvm/uvm_va_block.o nvidia-uvm/uvm_range_group.o nvidia-uvm/uvm_gpu_replayable_faults.o nvidia-uvm/uvm_gpu_non_replayable_faults.o nvidia-uvm/uvm_gpu_access_counters.o nvidia-uvm/uvm_perf_events.o nvidia-uvm/uvm_perf_module.o nvidia-uvm/uvm_mmu.o nvidia-uvm/uvm_pte_batch.o nvidia-uvm/uvm_tlb_batch.o nvidia-uvm/uvm_push.o nvidia-uvm/uvm_pushbuffer.o nvidia-uvm/uvm_thread_context.o nvidia-uvm/uvm_tracker.o nvidia-uvm/uvm_maxwell.o nvidia-uvm/uvm_maxwell_host.o nvidia-uvm/uvm_maxwell_ce.o nvidia-uvm/uvm_maxwell_mmu.o nvidia-uvm/uvm_maxwell_fault_buffer.o nvidia-uvm/uvm_maxwell_access_counter_buffer.o nvidia-uvm/uvm_pascal.o nvidia-uvm/uvm_pascal_ce.o nvidia-uvm/uvm_pascal_host.o nvidia-uvm/uvm_pascal_mmu.o nvidia-uvm/uvm_pascal_fault_buffer.o nvidia-uvm/uvm_volta_ce.o nvidia-uvm/uvm_volta_host.o nvidia-uvm/uvm_volta_mmu.o nvidia-uvm/uvm_volta.o nvidia-uvm/uvm_volta_fault_buffer.o nvidia-uvm/uvm_volta_access_counter_buffer.o nvidia-uvm/uvm_turing.o nvidia-uvm/uvm_turing_access_counter_buffer.o nvidia-uvm/uvm_turing_fault_buffer.o nvidia-uvm/uvm_turing_mmu.o nvidia-uvm/uvm_turing_host.o nvidia-uvm/uvm_ampere.o nvidia-uvm/uvm_ampere_ce.o nvidia-uvm/uvm_ampere_host.o nvidia-uvm/uvm_ampere_mmu.o nvidia-uvm/uvm_hopper.o nvidia-uvm/uvm_hopper_fault_buffer.o nvidia-uvm/uvm_hopper_ce.o nvidia-uvm/uvm_hopper_host.o nvidia-uvm/uvm_hopper_mmu.o nvidia-uvm/uvm_ada.o nvidia-uvm/uvm_policy.o nvidia-uvm/uvm_perf_utils.o nvidia-uvm/uvm_kvmalloc.o nvidia-uvm/uvm_pmm_sysmem.o nvidia-uvm/uvm_pmm_gpu.o nvidia-uvm/uvm_migrate.o nvidia-uvm/uvm_populate_pageable.o nvidia-uvm/uvm_migrate_pageable.o nvidia-uvm/uvm_map_external.o nvidia-uvm/uvm_user_channel.o nvidia-uvm/uvm_hmm.o nvidia-uvm/uvm_perf_heuristics.o nvidia-uvm/uvm_perf_thrashing.o nvidia-uvm/uvm_perf_prefetch.o nvidia-uvm/uvm_ats.o nvidia-uvm/uvm_ats_ibm.o nvidia-uvm/uvm_ats_faults.o nvidia-uvm/uvm_test.o nvidia-uvm/uvm_test_rng.o nvidia-uvm/uvm_range_tree_test.o nvidia-uvm/uvm_range_allocator_test.o nvidia-uvm/uvm_gpu_semaphore_test.o nvidia-uvm/uvm_mem_test.o nvidia-uvm/uvm_rm_mem_test.o nvidia-uvm/uvm_page_tree_test.o nvidia-uvm/uvm_tracker_test.o nvidia-uvm/uvm_push_test.o nvidia-uvm/uvm_channel_test.o nvidia-uvm/uvm_ce_test.o nvidia-uvm/uvm_host_test.o nvidia-uvm/uvm_lock_test.o nvidia-uvm/uvm_perf_utils_test.o nvidia-uvm/uvm_kvmalloc_test.o nvidia-uvm/uvm_pmm_test.o nvidia-uvm/uvm_pmm_sysmem_test.o nvidia-uvm/uvm_perf_events_test.o nvidia-uvm/uvm_perf_module_test.o nvidia-uvm/uvm_get_rm_ptes_test.o nvidia-uvm/uvm_fault_buffer_flush_test.o nvidia-uvm/uvm_peer_identity_mappings_test.o nvidia-uvm/uvm_va_block_test.o nvidia-uvm/uvm_range_group_tree_test.o nvidia-uvm/uvm_thread_context_test.o nvidia-uvm/uvm_rb_tree_test.o | awk '!x[$0]++ { print("/var/lib/dkms/nvidia/535.54.03/build/"$0) }' > /var/lib/dkms/nvidia/535.54.03/build/nvidia-uvm.mod
  printf '%s
'   nvidia-modeset/nvidia-modeset-linux.o nvidia-modeset/nv-kthread-q.o nvidia-modeset/nv-modeset-kernel.o | awk '!x[$0]++ { print("/var/lib/dkms/nvidia/535.54.03/build/"$0) }' > /var/lib/dkms/nvidia/535.54.03/build/nvidia-modeset.mod
  ln -sf /var/lib/dkms/nvidia/535.54.03/build/nvidia-modeset/nv-modeset-kernel.o_binary /var/lib/dkms/nvidia/535.54.03/build/nvidia-modeset/nv-modeset-kernel.o
  printf '%s
'   nvidia-drm/nvidia-drm.o nvidia-drm/nvidia-drm-drv.o nvidia-drm/nvidia-drm-utils.o nvidia-drm/nvidia-drm-crtc.o nvidia-drm/nvidia-drm-encoder.o nvidia-drm/nvidia-drm-connector.o nvidia-drm/nvidia-drm-gem.o nvidia-drm/nvidia-drm-fb.o nvidia-drm/nvidia-drm-modeset.o nvidia-drm/nvidia-drm-fence.o nvidia-drm/nvidia-drm-linux.o nvidia-drm/nvidia-drm-helper.o nvidia-drm/nv-pci-table.o nvidia-drm/nvidia-drm-gem-nvkms-memory.o nvidia-drm/nvidia-drm-gem-user-memory.o nvidia-drm/nvidia-drm-gem-dma-buf.o nvidia-drm/nvidia-drm-format.o | awk '!x[$0]++ { print("/var/lib/dkms/nvidia/535.54.03/build/"$0) }' > /var/lib/dkms/nvidia/535.54.03/build/nvidia-drm.mod
 CONFTEST: hash__remap_4k_pfn
 CONFTEST: set_pages_uc
 CONFTEST: list_is_first
 CONFTEST: set_memory_uc
 CONFTEST: set_memory_array_uc
 CONFTEST: set_pages_array_uc
 CONFTEST: ioremap_cache
 CONFTEST: ioremap_wc
 CONFTEST: pci_get_domain_bus_and_slot
 CONFTEST: get_num_physpages
 CONFTEST: pde_data
 CONFTEST: xen_ioemu_inject_msi
 CONFTEST: phys_to_dma
 CONFTEST: get_dma_ops
 CONFTEST: dma_attr_macros
 CONFTEST: dma_map_page_attrs
 CONFTEST: write_cr4
 CONFTEST: of_find_node_by_phandle
 CONFTEST: of_node_to_nid
 CONFTEST: pnv_pci_get_npu_dev
 CONFTEST: of_get_ibm_chip_id
 CONFTEST: pci_bus_address
 CONFTEST: pci_stop_and_remove_bus_device
 CONFTEST: pci_rebar_get_possible_sizes
 CONFTEST: wait_for_random_bytes
 CONFTEST: register_cpu_notifier
 CONFTEST: cpuhp_setup_state
 CONFTEST: dma_map_resource
 CONFTEST: get_backlight_device_by_name
 CONFTEST: timer_setup
 CONFTEST: pci_enable_msix_range
 CONFTEST: kernel_read_has_pointer_pos_arg
 CONFTEST: kernel_write_has_pointer_pos_arg
 CONFTEST: dma_direct_map_resource
 CONFTEST: tegra_get_platform
 CONFTEST: tegra_bpmp_send_receive
 CONFTEST: flush_cache_all
 CONFTEST: vmf_insert_pfn
 CONFTEST: jiffies_to_timespec
 CONFTEST: ktime_get_raw_ts64
 CONFTEST: ktime_get_real_ts64
 CONFTEST: full_name_hash
 CONFTEST: pci_enable_atomic_ops_to_root
 CONFTEST: vga_tryget
 CONFTEST: pgprot_decrypted
 CONFTEST: cc_mkdec
 CONFTEST: seq_read_iter
 CONFTEST: unsafe_follow_pfn
 CONFTEST: drm_gem_object_get
 CONFTEST: drm_gem_object_put_unlocked
 CONFTEST: add_memory_driver_managed
 CONFTEST: device_property_read_u64
 CONFTEST: devm_of_platform_populate
 CONFTEST: of_dma_configure
 CONFTEST: of_property_count_elems_of_size
 CONFTEST: of_property_read_variable_u8_array
 CONFTEST: of_property_read_variable_u32_array
 CONFTEST: i2c_new_client_device
 CONFTEST: i2c_unregister_device
 CONFTEST: of_get_named_gpio
 CONFTEST: devm_gpio_request_one
 CONFTEST: gpio_direction_input
 CONFTEST: gpio_direction_output
 CONFTEST: gpio_get_value
 CONFTEST: gpio_set_value
 CONFTEST: gpio_to_irq
 CONFTEST: icc_get
 CONFTEST: icc_put
 CONFTEST: icc_set_bw
 CONFTEST: dma_buf_export_args
 CONFTEST: dma_buf_ops_has_kmap
 CONFTEST: dma_buf_ops_has_kmap_atomic
 CONFTEST: dma_buf_ops_has_map
 CONFTEST: dma_buf_ops_has_map_atomic
 CONFTEST: dma_buf_has_dynamic_attachment
 CONFTEST: dma_buf_attachment_has_peer2peer
 CONFTEST: dma_set_mask_and_coherent
 CONFTEST: devm_clk_bulk_get_all
 CONFTEST: get_task_ioprio
 CONFTEST: mdev_set_iommu_device
 CONFTEST: offline_and_remove_memory
 CONFTEST: wait_on_bit_lock_argument_count
 CONFTEST: radix_tree_empty
 CONFTEST: radix_tree_replace_slot
 CONFTEST: pnv_npu2_init_context
 CONFTEST: cpumask_of_node
 CONFTEST: ioasid_get
 CONFTEST: mm_pasid_set
 CONFTEST: migrate_vma_setup
 CONFTEST: mmget_not_zero
 CONFTEST: mmgrab
 CONFTEST: iommu_sva_bind_device_has_drvdata_arg
 CONFTEST: vm_fault_to_errno
 CONFTEST: acpi_video_backlight_use_native
 CONFTEST: drm_dev_unref
 CONFTEST: drm_reinit_primary_mode_group
 CONFTEST: get_user_pages_remote
 CONFTEST: get_user_pages
 CONFTEST: pin_user_pages_remote
 CONFTEST: pin_user_pages
 CONFTEST: drm_gem_object_lookup
 CONFTEST: drm_atomic_state_ref_counting
 CONFTEST: drm_driver_has_gem_prime_res_obj
 CONFTEST: drm_atomic_helper_connector_dpms
 CONFTEST: drm_connector_funcs_have_mode_in_name
 CONFTEST: drm_connector_has_vrr_capable_property
 CONFTEST: drm_framebuffer_get
 CONFTEST: drm_dev_put
 CONFTEST: drm_format_num_planes
 CONFTEST: drm_connector_for_each_possible_encoder
 CONFTEST: drm_rotation_available
 CONFTEST: drm_vma_offset_exact_lookup_locked
 CONFTEST: nvhost_dma_fence_unpack
 CONFTEST: is_export_symbol_gpl_of_node_to_nid
 CONFTEST: is_export_symbol_gpl_sme_active
 CONFTEST: is_export_symbol_present_swiotlb_map_sg_attrs
 CONFTEST: is_export_symbol_present_swiotlb_dma_ops
 CONFTEST: is_export_symbol_present___close_fd
 CONFTEST: is_export_symbol_present_close_fd
 CONFTEST: is_export_symbol_present_get_unused_fd
 CONFTEST: is_export_symbol_present_get_unused_fd_flags
 CONFTEST: is_export_symbol_present_nvhost_get_default_device
 CONFTEST: is_export_symbol_present_nvhost_syncpt_unit_interface_get_byte_offset
 CONFTEST: is_export_symbol_present_nvhost_syncpt_unit_interface_get_aperture
 CONFTEST: is_export_symbol_present_tegra_dce_register_ipc_client
 CONFTEST: is_export_symbol_present_tegra_dce_unregister_ipc_client
 CONFTEST: is_export_symbol_present_tegra_dce_client_ipc_send_recv
 CONFTEST: is_export_symbol_present_dram_clk_to_mc_clk
 CONFTEST: is_export_symbol_present_get_dram_num_channels
 CONFTEST: is_export_symbol_present_tegra_dram_types
 CONFTEST: is_export_symbol_present_pxm_to_node
 CONFTEST: is_export_symbol_present_screen_info
 CONFTEST: is_export_symbol_present_i2c_bus_status
 CONFTEST: is_export_symbol_present_tegra_fuse_control_read
 CONFTEST: is_export_symbol_present_tegra_get_platform
 CONFTEST: is_export_symbol_present_pci_find_host_bridge
 CONFTEST: is_export_symbol_present_tsec_comms_send_cmd
 CONFTEST: is_export_symbol_present_tsec_comms_set_init_cb
 CONFTEST: is_export_symbol_present_tsec_comms_clear_init_cb
 CONFTEST: is_export_symbol_present_tsec_comms_alloc_mem_from_gscco
 CONFTEST: is_export_symbol_present_tsec_comms_free_gscco_mem
 CONFTEST: is_export_symbol_present_int_active_memcg
 CONFTEST: dma_ops
 CONFTEST: swiotlb_dma_ops
 CONFTEST: noncoherent_swiotlb_dma_ops
 CONFTEST: vm_fault_has_address
 CONFTEST: vm_insert_pfn_prot
 CONFTEST: vmf_insert_pfn_prot
 CONFTEST: vm_ops_fault_removed_vma_arg
 CONFTEST: kmem_cache_has_kobj_remove_work
 CONFTEST: sysfs_slab_unlink
 CONFTEST: proc_ops
 CONFTEST: timespec64
 CONFTEST: vmalloc_has_pgprot_t_arg
 CONFTEST: mm_has_mmap_lock
 CONFTEST: pci_channel_state
 CONFTEST: pci_dev_has_ats_enabled
 CONFTEST: remove_memory_has_nid_arg
 CONFTEST: add_memory_driver_managed_has_mhp_flags_arg
 CONFTEST: num_registered_fb
 CONFTEST: pci_driver_has_driver_managed_dma
 CONFTEST: vm_area_struct_has_const_vm_flags
 CONFTEST: memory_failure_has_trapno_arg
 CONFTEST: backing_dev_info
 CONFTEST: mm_context_t
 CONFTEST: vm_fault_t
 CONFTEST: mmu_notifier_ops_invalidate_range
 CONFTEST: migrate_vma_added_flags
 CONFTEST: migrate_device_range
 CONFTEST: handle_mm_fault_has_mm_arg
 CONFTEST: handle_mm_fault_has_pt_regs_arg
 CONFTEST: drm_bus_present
 CONFTEST: drm_bus_has_bus_type
 CONFTEST: drm_bus_has_get_irq
 CONFTEST: drm_bus_has_get_name
 CONFTEST: drm_driver_has_device_list
 CONFTEST: drm_driver_has_legacy_dev_list
 CONFTEST: drm_driver_has_set_busid
 CONFTEST: drm_crtc_state_has_connectors_changed
 CONFTEST: drm_init_function_args
 CONFTEST: drm_helper_mode_fill_fb_struct
 CONFTEST: drm_master_drop_has_from_release_arg
 CONFTEST: drm_driver_unload_has_int_return_type
 CONFTEST: drm_atomic_helper_crtc_destroy_state_has_crtc_arg
 CONFTEST: drm_atomic_helper_plane_destroy_state_has_plane_arg
 CONFTEST: drm_mode_object_find_has_file_priv_arg
 CONFTEST: dma_buf_owner
 CONFTEST: drm_connector_list_iter
 CONFTEST: drm_atomic_helper_swap_state_has_stall_arg
 CONFTEST: drm_driver_prime_flag_present
 CONFTEST: drm_gem_object_has_resv
 CONFTEST: drm_crtc_state_has_async_flip
 CONFTEST: drm_crtc_state_has_pageflip_flags
 CONFTEST: drm_crtc_state_has_vrr_enabled
 CONFTEST: drm_format_modifiers_present
 CONFTEST: drm_vma_node_is_allowed_has_tag_arg
 CONFTEST: drm_vma_offset_node_has_readonly
 CONFTEST: drm_display_mode_has_vrefresh
 CONFTEST: drm_driver_master_set_has_int_return_type
 CONFTEST: drm_driver_has_gem_free_object
 CONFTEST: drm_prime_pages_to_sg_has_drm_device_arg
 CONFTEST: drm_driver_has_gem_prime_callbacks
 CONFTEST: drm_crtc_atomic_check_has_atomic_state_arg
 CONFTEST: drm_gem_object_vmap_has_map_arg
 CONFTEST: drm_plane_atomic_check_has_atomic_state_arg
 CONFTEST: drm_device_has_pdev
 CONFTEST: drm_crtc_state_has_no_vblank
 CONFTEST: drm_mode_config_has_allow_fb_modifiers
 CONFTEST: drm_has_hdr_output_metadata
 CONFTEST: dma_resv_add_fence
 CONFTEST: dma_resv_reserve_fences
 CONFTEST: reservation_object_reserve_shared_has_num_fences_arg
 CONFTEST: drm_connector_has_override_edid
 CONFTEST: drm_master_has_leases
 CONFTEST: drm_file_get_master
 CONFTEST: drm_modeset_lock_all_end
 CONFTEST: drm_connector_lookup
 CONFTEST: drm_connector_put
 CONFTEST: drm_driver_has_dumb_destroy
 CONFTEST: dom0_kernel_present
 CONFTEST: nvidia_vgpu_kvm_build
 CONFTEST: nvidia_grid_build
 CONFTEST: nvidia_grid_csp_build
 CONFTEST: pm_runtime_available
 CONFTEST: pci_class_multimedia_hd_audio
 CONFTEST: drm_available
 CONFTEST: vfio_pci_core_available
 CONFTEST: mdev_available
 CONFTEST: cmd_uphy_display_port_init
 CONFTEST: cmd_uphy_display_port_off
 CONFTEST: memory_failure_mf_sw_simulated_defined
 CONFTEST: drm_atomic_available
 CONFTEST: is_export_symbol_gpl_refcount_inc
 CONFTEST: is_export_symbol_gpl_refcount_dec_and_test
 CONFTEST: drm_alpha_blending_available
 CONFTEST: ib_peer_memory_symbols

...

  cc -Wp,-MMD,/var/lib/dkms/nvidia/535.54.03/build/nvidia/.nv-dma.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -I./ubuntu/include -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -funsigned-char -std=gnu11 --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mstack-alignment=8 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -O2 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=zero -fzero-call-used-regs=used-gpr -pg -mrecord-mcount -falign-functions=16 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -g -gdwarf-5 -I/var/lib/dkms/nvidia/535.54.03/build/common/inc -I/var/lib/dkms/nvidia/535.54.03/build -Wall -Wno-cast-qual -Wno-error -Wno-format-extra-args -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"535.54.03\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -ffreestanding -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -DNV_SPECTRE_V2=0 -DNV_KERNEL_INTERFACE_LAYER -I/var/lib/dkms/nvidia/535.54.03/build/nvidia -DNVIDIA_UNDEF_LEGACY_BIT_MACROS -UDEBUG -U_DEBUG -DNDEBUG  -fsanitize=bounds -fsanitize=shift -fsanitize=bool -fsanitize=enum  -DMODULE  -DKBUILD_BASENAME='"nv_dma"' -DKBUILD_MODNAME='"nvidia"' -D__KBUILD_MODNAME=kmod_nvidia -c -o /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-dma.o /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-dma.c   ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --retpoline --rethunk --sls --stackval --static-call --uaccess --prefix=16   --module /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-dma.o
clang: error: unknown argument: '-fconserve-stack'
  cc -Wp,-MMD,/var/lib/dkms/nvidia/535.54.03/build/nvidia/.nv-i2c.o.d -nostdinc -I./arch/x86/include -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -I./ubuntu/include -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -funsigned-char -std=gnu11 --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fcf-protection=none -m64 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mstack-alignment=8 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mfunction-return=thunk-extern -fno-jump-tables -mharden-sls=all -fpatchable-function-entry=16,16 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -O2 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-main -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=zero -fzero-call-used-regs=used-gpr -pg -mrecord-mcount -falign-functions=16 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack -Werror=date-time -g -gdwarf-5 -I/var/lib/dkms/nvidia/535.54.03/build/common/inc -I/var/lib/dkms/nvidia/535.54.03/build -Wall -Wno-cast-qual -Wno-error -Wno-format-extra-args -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"535.54.03\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -ffreestanding -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -DNV_SPECTRE_V2=0 -DNV_KERNEL_INTERFACE_LAYER -I/var/lib/dkms/nvidia/535.54.03/build/nvidia -DNVIDIA_UNDEF_LEGACY_BIT_MACROS -UDEBUG -U_DEBUG -DNDEBUG  -fsanitize=bounds -fsanitize=shift -fsanitize=bool -fsanitize=enum  -DMODULE  -DKBUILD_BASENAME='"nv_i2c"' -DKBUILD_MODNAME='"nvidia"' -D__KBUILD_MODNAME=kmod_nvidia -c -o /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-i2c.o /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-i2c.c   ; ./tools/objtool/objtool --hacks=jump_label --hacks=noinstr --hacks=skylake --retpoline --rethunk --sls --stackval --static-call --uaccess --prefix=16   --module /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-i2c.o
clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-unknown-linux-gnu'
clang: error: '-ftrivial-auto-var-init=zero' hasn't been enabled; enable it at your own peril for benchmarking purpose only with '-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang'
clang: error: unknown argument: '-fconserve-stack'
clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-unknown-linux-gnu'
clang: error: '-ftrivial-auto-var-init=zero' hasn't been enabled; enable it at your own peril for benchmarking purpose only with '-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang'
clang: error: unknown argument: '-fconserve-stack'
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv.o] Error 1
clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-unknown-linux-gnu'
clang: error: '-ftrivial-auto-var-init=zero' hasn't been enabled; enable it at your own peril for benchmarking purpose only with '-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang'
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-pci.o] Error 1
clang: error: unknown argument: '-fconserve-stack'
clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-unknown-linux-gnu'
clang: error: '-ftrivial-auto-var-init=zero' hasn't been enabled; enable it at your own peril for benchmarking purpose only with '-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang'
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-dmabuf.o] Error 1
clang: error: unknown argument: '-fconserve-stack'
clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-unknown-linux-gnu'
clang: error: '-ftrivial-auto-var-init=zero' hasn't been enabled; enable it at your own peril for benchmarking purpose only with '-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang'
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-nano-timer.o] Error 1
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-acpi.o] Error 1
clang: error: unknown argument: '-fconserve-stack'
clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-unknown-linux-gnu'
clang: error: '-ftrivial-auto-var-init=zero' hasn't been enabled; enable it at your own peril for benchmarking purpose only with '-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang'
clang: error: unknown argument: '-fconserve-stack'
clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-unknown-linux-gnu'
clang: error: '-ftrivial-auto-var-init=zero' hasn't been enabled; enable it at your own peril for benchmarking purpose only with '-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang'
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-cray.o] Error 1
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-dma.o] Error 1
clang: error: unknown argument: '-fconserve-stack'
clang: error: unsupported option '-mrecord-mcount' for target 'x86_64-unknown-linux-gnu'
clang: error: '-ftrivial-auto-var-init=zero' hasn't been enabled; enable it at your own peril for benchmarking purpose only with '-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang'
make[2]: *** [scripts/Makefile.build:260: /var/lib/dkms/nvidia/535.54.03/build/nvidia/nv-i2c.o] Error 1
make[1]: *** [Makefile:2026: /var/lib/dkms/nvidia/535.54.03/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.2.0-24-generic'
make: *** [Makefile:82: modules] Error 2

日志太长,无法全部插入。

我不知道如何恢复正常。现在我非常害怕再次更新系统。

答案1

从日志来看,似乎您安装了 Nvidia 驱动程序版本 535,并且您的升级/更新尝试将其降级至版本 530。

首先尝试apt-get checkapt-get autoclean看看问题是否消失。

如果没有,我建议删除所有驱动程序并重新安装所需的驱动程序。看看你是否可以通过Software & Updates(app) ->卸载它们Additional Drivers。如果这不起作用,请查看此回答并根据您的需要进行调整。

答案2

问题是由于您的默认 C 编译器与内核构建过程所需的编译器存在很大差异,导致无法识别构建参数。就您而言,内核是使用 GCC 12 构建的,而您使用的是 Clang。

使用最新的 HWE 内核时可能会出现类似的问题,因为它们可能使用比发行版默认版本更新的 GCC 版本。

要解决这个问题,请在 Make 日志或崩溃日志中查找匹配的行The kernel was built by,然后尝试安装内核使用的 GCC 版本,并使用 将其设置为默认值update-alternatives

有一个很好的答案可以解释如何安装新版本的 GCC 并将其设置为默认版本

相关内容