未找到 linux 内核头文件

未找到 linux 内核头文件

我无法超越:

apt install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-4.18.0-kali2-amd64
E: Couldn't find any package by glob 'linux-headers-4.18.0-kali2-amd64'
E: Couldn't find any package by regex 'linux-headers-4.18.0-kali2-amd64'

我检查了我的sources.list,其中包含:

deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free

uname -r返回:

4.18.0-kali2-amd64

当我跑步时apt-cache search linux-image我得到:

linux-headers-4.18.0-kali3-amd64 - Header files for Linux 4.18.0-kali3-amd64
linux-headers-4.18.0-kali3-cloud-amd64 - Header files for Linux 4.18.0-kali3-cloud-amd64
linux-headers-4.18.0-kali3-rt-amd64 - Header files for Linux 4.18.0-kali3-rt-amd64
linux-image-4.18.0-kali3-amd64 - Linux 4.18 for 64-bit PCs
linux-image-4.18.0-kali3-amd64-dbg - Debug symbols for linux-image-4.18.0-kali3-amd64
linux-image-4.18.0-kali3-cloud-amd64 - Linux 4.18 for x86-64 cloud
linux-image-4.18.0-kali3-cloud-amd64-dbg - Debug symbols for linux-image-4.18.0-kali3-cloud-amd64
linux-image-4.18.0-kali3-rt-amd64 - Linux 4.18 for 64-bit PCs, PREEMPT_RT
linux-image-4.18.0-kali3-rt-amd64-dbg - Debug symbols for linux-image-4.18.0-kali3-rt-amd64
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-amd64-dbg - Debugging symbols for Linux amd64 configuration (meta-package)
linux-image-cloud-amd64 - Linux for x86-64 cloud (meta-package)
linux-image-cloud-amd64-dbg - Debugging symbols for Linux cloud-amd64 configuration (meta-package)
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT
linux-image-rt-amd64-dbg - Debugging symbols for Linux rt-amd64 configuration (meta-package)
linux-image-4.18.0-kali2-amd64 - Linux 4.18 for 64-bit PCs

我在具有实时持久性的外部 SSD 上运行 kali。

我确实更新和升级了。

答案1

您需要首先升级内核软件包,因为您似乎已经安装了 4.18.0-kali2,但此时软件包存储库中只有 4.18.0-kali3 可用。

安装内核时,当前版本是 4.18.0-kali2。这是运行不保证版本长期可用的发行版的风险。

请注意,即使在安装新的内核版本之后,在重新启动到该内核之前,$(uname -r)仍然会返回旧版本号。

相关内容