问题描述
我的操作系统是debian 11,内核为5.8.0-2-amd64。 我需要“ linux-headers-5.8.0-2-amd64”来制作自己的内核模块。 然后,我使用“ apt-cache搜索”和“ apt搜索”来找到它,但是它们两者都找不到。 我在哪里可以下载此标头?
以下是“ /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
解决方法
您必须下载标题并安装它们。
http://ubuntuhandbook.org/index.php/2020/08/install-linux-kernel-5-8-ubuntu/
这是一个很好的教程,介绍如何编译内核并下载标头。在较新的版本中,它是linux-headers-amd64
。您可以在您的版本中尝试此操作,以获取您的版本的标题。
我已经检查了版本。因此,您应该对存储库中的内核进行dist-up升级。
https://packages.debian.org/bullseye/linux-headers-amd64
对于Debian 11,它是5.9,那么如果可以的话,您可以从仓库中安装头文件。