1

我正在尝试安装内核头文件但收到此错误

E: 找不到包 linux-headers-5.9.0-kali1-amd64

E: 通过 glob 'linux-headers-5.9.0-kali1-amd64' 找不到任何包

E: 通过正则表达式 'linux-headers-5.9.0-kali1-amd64' 找不到任何包

我已在 sources.list 中更新并取消注释此行

deb-src http://http.kali.org/kali kali-rolling 主要贡献非免费

但是无法找到的错误regexglob。我错过了什么?

4

2 回答 2

2

这是您可能需要做的事情

sudo apt-get update # This will update the repositories list
sudo apt-get upgrade # This will update all the necessary packages on your system
sudo apt-get dist-upgrade # This will add/remove any needed packages
reboot # You may need this since sometimes after a upgrade/dist-upgrade, there are some left over entries that get fixed after a reboot
sudo apt-get install linux-headers-$(uname -r) # This should work now
于 2022-02-28T16:53:20.133 回答
1

从我的猜测 linux-headers-5.9.0 在kali存储库中不可用。

您始终可以使用 apt-cache search linux-headers 来了解它是否可用,但要更新到最新的 linux 标头

sudo apt-get 更新

sudo apt-get dist-upgrade

然后使用 apt search Linux-headers 搜索可用的 Linux-headers。

所以你安装最新版本使用

sudo apt-get install -y linux-headers-$(uname -r)
于 2021-04-20T08:42:05.263 回答