喵星之旅-屯粮的松鼠-debian-linux-headers缺失

系统环境debian12。
安装本身是很简单的,但是很可能会软件找不到。

安装

1
sudo apt install   linux-headers-$(uname -r) -y

如果成功则结束,否则需要进行如下操作,然后再回来安装。

debian配置软件源

编辑/etc/apt/sources.list文件.这里是debian12的配置,可参考https://mirrors.ustc.edu.cn/repogen/ 根据版本号查询,12对应着书虫(bookworm)。

1
2
3
4
5
6
7
8
9
10
11
deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware

更新软件源

1
2
sudo apt update
sudo apt upgrade
文章目录
  1. 安装
  2. debian配置软件源
|