事件:站长今日新购一台低配置VPS,系统为Debian 10,按惯例将4.19.x.x的内核版本升级到官方最新5.10.x.x内核。在添加buster-backports源之后,apt update却报错了。
报错内容:The repository ‘http://deb.debian.org/debian buster-backports Release’ does not have a Release file.
解决办法:将将 buster-backports 源从http://deb.debian.org/debian 切换到 http://archive.debian.org/debian 即可。
以下为本次事件完整记录(含截图)。
报错完整记录:
root@hostcsr.com:~# apt update -y Hit:1 http://security.debian.org/debian-security buster/updates InRelease Hit:2 http://deb.debian.org/debian buster InRelease Hit:3 http://deb.debian.org/debian buster-updates InRelease Ign:4 http://deb.debian.org/debian buster-backports InRelease Err:5 http://deb.debian.org/debian buster-backports Release 404 Not Found [IP: 146.75.94.132 80] Reading package lists... Done E: The repository 'http://deb.debian.org/debian buster-backports Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
报错截图:
修复办法:将 buster-backports 源从http://deb.debian.org/debian 切换到 http://archive.debian.org/debian 即可。
编辑sources.list:
nano /etc/apt/sources.list
原始 buster-backports 源
deb http://deb.debian.org/debian buster-backports main
修改 buster-backports 源后
deb http://archive.debian.org/debian buster-backports main
完整 sources.list 示例:
deb http://deb.debian.org/debian/ buster main deb-src http://deb.debian.org/debian/ buster main deb http://security.debian.org/debian-security buster/updates main deb-src http://security.debian.org/debian-security buster/updates main deb http://deb.debian.org/debian/ buster-updates main deb-src http://deb.debian.org/debian/ buster-updates main deb http://archive.debian.org/debian buster-backports main
完整 sources.list 示例:(截图)
之后 apt update 正常,如下图。
升级内核可以参考本站文章:Debian 10 如何升级官方buster-backports源5.10.X内核版本