在安装N卡驱动时出现报错:ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option.
,然后我按照网上说的安装linux-kernel,结果:
brandon@debian:~/Downloads$ uname -r
6.1.0-13-amd64
brandon@debian:~/Downloads$ sudo apt install linux-headers-$(uname -r)
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
E: 无法定位软件包 linux-headers-6.1.0-13-amd64
E: 无法按照 glob ‘linux-headers-6.1.0-13-amd64’ 找到任何软件包
brandon@debian:~/Downloads$
然后我看了下我的安装源有的linux-headers:
brandon@debian:~/Downloads$ apt install linux-headers-
linux-headers-6.1.0-11-686 linux-headers-6.1.0-12-686-pae linux-headers-6.1.0-15-amd64 linux-headers-6.1.0-16-cloud-amd64 linux-headers-6.1.0-17-common linux-headers-6.1.0-18-common-rt linux-headers-6.6.13+bpo-686-pae linux-headers-rt-686-pae
linux-headers-6.1.0-11-686-pae linux-headers-6.1.0-12-amd64 linux-headers-6.1.0-15-cloud-amd64 linux-headers-6.1.0-16-common linux-headers-6.1.0-17-common-rt linux-headers-6.1.0-18-rt-686-pae linux-headers-6.6.13+bpo-amd64 linux-headers-rt-amd64
linux-headers-6.1.0-11-amd64 linux-headers-6.1.0-12-cloud-amd64 linux-headers-6.1.0-15-common linux-headers-6.1.0-16-common-rt linux-headers-6.1.0-17-rt-686-pae linux-headers-6.1.0-18-rt-amd64 linux-headers-6.6.13+bpo-cloud-amd64
linux-headers-6.1.0-11-cloud-amd64 linux-headers-6.1.0-12-common linux-headers-6.1.0-15-common-rt linux-headers-6.1.0-16-rt-686-pae linux-headers-6.1.0-17-rt-amd64 linux-headers-6.5.0-0.deb12.4-686 linux-headers-6.6.13+bpo-common
linux-headers-6.1.0-11-common linux-headers-6.1.0-12-common-rt linux-headers-6.1.0-15-rt-686-pae linux-headers-6.1.0-16-rt-amd64 linux-headers-6.1.0-18-686 linux-headers-6.5.0-0.deb12.4-686-pae linux-headers-6.6.13+bpo-common-rt
linux-headers-6.1.0-11-common-rt linux-headers-6.1.0-12-rt-686-pae linux-headers-6.1.0-15-rt-amd64 linux-headers-6.1.0-17-686 linux-headers-6.1.0-18-686-pae linux-headers-6.5.0-0.deb12.4-amd64 linux-headers-6.6.13+bpo-rt-686-pae
linux-headers-6.1.0-11-rt-686-pae linux-headers-6.1.0-12-rt-amd64 linux-headers-6.1.0-16-686 linux-headers-6.1.0-17-686-pae linux-headers-6.1.0-18-amd64 linux-headers-6.5.0-0.deb12.4-cloud-amd64 linux-headers-6.6.13+bpo-rt-amd64
linux-headers-6.1.0-11-rt-amd64 linux-headers-6.1.0-15-686 linux-headers-6.1.0-16-686-pae linux-headers-6.1.0-17-amd64 linux-headers-6.1.0-18-cloud-amd64 linux-headers-6.5.0-0.deb12.4-common linux-headers-amd64
linux-headers-6.1.0-12-686 linux-headers-6.1.0-15-686-pae linux-headers-6.1.0-16-amd64 linux-headers-6.1.0-17-cloud-amd64 linux-headers-6.1.0-18-common linux-headers-6.6.13+bpo-686 linux-headers-cloud-amd64
并没有我想要的header
这种问题应该如何解决?
附加信息:
现在用的软件源
#from 'https://mirrors.tuna.tsinghua.edu.cn/help/debian/'
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
#from 'https://wiki.debian.org/SourcesList'
deb http://deb.debian.org/debian bookworm main non-free-firmware
deb-src http://deb.debian.org/debian bookworm main non-free-firmware
deb http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware
deb-src http://deb.debian.org/debian-security/ bookworm-security main non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main non-free-firmware
brandon@debian:~/Downloads$ lspci
0000:00:00.0 Host bridge: Intel Corporation Device a702 (rev 01)
0000:00:01.0 PCI bridge: Intel Corporation Device a70d (rev 01)
0000:00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-S UHD Graphics (rev 04)
0000:00:04.0 Signal processing controller: Intel Corporation Raptor Lake Dynamic Platform and Thermal Framework Processor Participant (rev 01)
0000:00:08.0 System peripheral: Intel Corporation GNA Scoring Accelerator module (rev 01)
0000:00:0e.0 RAID bus controller: Intel Corporation Volume Management Device NVMe RAID Controller Intel Corporation
0000:00:14.0 USB controller: Intel Corporation Device 7a60 (rev 11)
0000:00:14.2 RAM memory: Intel Corporation Device 7a27 (rev 11)
0000:00:14.3 Network controller: Intel Corporation Device 7a70 (rev 11)
0000:00:15.0 Serial bus controller: Intel Corporation Device 7a4c (rev 11)
0000:00:15.1 Serial bus controller: Intel Corporation Device 7a4d (rev 11)
0000:00:16.0 Communication controller: Intel Corporation Device 7a68 (rev 11)
0000:00:1a.0 PCI bridge: Intel Corporation Device 7a48 (rev 11)
0000:00:1c.0 PCI bridge: Intel Corporation Device 7a3d (rev 11)
0000:00:1f.0 ISA bridge: Intel Corporation Device 7a0c (rev 11)
0000:00:1f.3 Audio device: Intel Corporation Device 7a50 (rev 11)
0000:00:1f.4 SMBus: Intel Corporation Device 7a23 (rev 11)
0000:00:1f.5 Serial bus controller: Intel Corporation Device 7a24 (rev 11)
0000:01:00.0 VGA compatible controller: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] (rev a1)
0000:01:00.1 Audio device: NVIDIA Corporation Device 22be (rev a1)
0000:02:00.0 PCI bridge: Intel Corporation Device 1133 (rev 02)
0000:03:00.0 PCI bridge: Intel Corporation Device 1133 (rev 02)
0000:03:01.0 PCI bridge: Intel Corporation Device 1133 (rev 02)
0000:03:02.0 PCI bridge: Intel Corporation Device 1133 (rev 02)
0000:03:03.0 PCI bridge: Intel Corporation Device 1133 (rev 02)
0000:04:00.0 USB controller: Intel Corporation Device 1134
0000:38:00.0 USB controller: Intel Corporation Device 1135
0000:6c:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
10000:e0:1b.0 System peripheral: Intel Corporation RST VMD Managed Controller
10000:e0:1b.4 PCI bridge: Intel Corporation Device 7a44 (rev 11)
10000:e1:00.0 Non-Volatile memory controller: Sandisk Corp WD Black SN770 NVMe SSD (rev 01)