惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
博客园 - 司徒正美
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
博客园 - 聂微东
M
MIT News - Artificial intelligence
博客园_首页
Jina AI
Jina AI
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
Vercel News
Vercel News
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
B
Blog
Google DeepMind News
Google DeepMind News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

codeqihan的博客

现代化的开源终端-Tabby 基于Rust开发的编辑器-Edit ChatGPT Atlas使用体验 联通宽带改桥接 Chrony安装以及配置 电信跨网QoS ungoogled-chromium浏览器简介 npm的高性能替代品pnpm 使用markdownlint-cli格式化Markdown文件 Nginx的安装以及配置 使用unattended-upgrades自动更新软件包 压缩网页体积 Debian切换至Testing/Sid版本 2024年度总结 轻量级的探针-Beszel ai.robots.txt阻止AI爬虫 甲骨文圣何塞ARM测评 公共DOH收集 com又涨价了
Debian使用Backports源
codeqihan · 2025-02-20 · via codeqihan的博客

Debian稳定版更新较慢(在发布以后只进行错误修复以及安全更新),因此如果想要使用最新的软件包(例如最新版本的内核),推荐使用Backports源。一般情况下Backports的软件包来自Debian Testing(部分来自Debian Sid,例如安全更新),经过重新编译后发布,一般来说算是稳定的。
Backports和Testing一样,没有及时的安全更新,这一点需要注意。

如果想要使用Backports源,可以修改/etc/apt/sources.list(容器中的Debian 12可能是/etc/apt/sources.list.d/debian.sources),添加Backports源,例如原来的/etc/apt/sources.list是这样的:

1
2
3
4
5
6
7
8
9
deb https://deb.debian.org/debian/ bookworm main

deb-src https://deb.debian.org/debian/ bookworm main

deb https://security.debian.org/debian-security bookworm-security main
deb-src https://security.debian.org/debian-security bookworm-security main

deb https://deb.debian.org/debian/ bookworm-updates main
deb-src https://deb.debian.org/debian/ bookworm-updates main

修改为:

1
2
3
4
5
6
7
8
9
10
11
12
deb https://deb.debian.org/debian/ bookworm main

deb-src https://deb.debian.org/debian/ bookworm main

deb https://security.debian.org/debian-security bookworm-security main
deb-src https://security.debian.org/debian-security bookworm-security main

deb https://deb.debian.org/debian/ bookworm-updates main
deb-src https://deb.debian.org/debian/ bookworm-updates main

deb https://deb.debian.org/debian/ bookworm-backports main
deb-src https://deb.debian.org/debian/ bookworm-backports main

即添加了bookworm-backports(Debian 12的Backports源,如果是别的版本则为版本代号-backports),之后apt update更新软件包索引,然后安装需要安装的Backports软件包:

1
apt install -t bookworm-backports 需要安装的软件包

例如安装amd64架构的Linux Cloud内核(精简版本的Linux内核,适合用于服务器环境。如果想要安装非精简版本的Linux内核则为apt install -t bookworm-backports linux-image-amd64

1
apt install -t bookworm-backports linux-image-cloud-amd64

如果想要安装指定的Linux内核版本,可以试着使用linux-image-6.12.9+bpo-cloud-amd64这样的的指定版本的方式安装(未测试)。
如果安装的是内核,重启之后即可使用新安装的Linux内核。