首页 > 解决方案 > “apt-cache search”找不到“linux-header-5.8.0-2-amd64”

问题描述

我的操作系统是 debian 11,内核为 5.8.0-2-amd64。我需要“linux-headers-5.8.0-2-amd64”来制作我自己的内核模块。然后,我使用“apt-cache search”和“apt search”找到它,但它们都找不到它。我在哪里可以下载这个标题?

以下是“/etc/apt/sources.list”的内容:

deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free

deb http://deb.debian.org/debian bullseye-updates main contrib non-free 
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

标签: linuxdebiankernel-module

解决方案


您必须下载标题并安装它们。

http://ubuntuhandbook.org/index.php/2020/08/install-linux-kernel-5-8-ubuntu/

这是一个很好的教程如何编译内核和下载头文件。在较新的版本中,它是linux-headers-amd64. 您可以在您的版本中尝试此操作以获取您的版本的标题。

我检查了版本。因此,您应该对 repo 中的内核进行 dist-upgrade。

https://packages.debian.org/bullseye/linux-headers-amd64

对于 Debian 11,它是 5.9,如果可能的话,您可以从 repo 安装标头。


推荐阅读