大网数据广告活动
服务器运维问答

After upgrade from Debian 10 Buster to Debian 11 Bullseye security updates 404 not found

· 52CE 我爱测

Doing recommended upgrade path, TL;DR: Backup data, then apt update apt upgrade apt dist-upgrade reboot Also disable all non main stream packages if any. Then preparing APT for new distribution: sudo sed -i 's/buster/bullseye/g' …

问题原文

原帖链接 · Arunas Bart · CC BY-SA 4.0

Doing recommended upgrade path, TL;DR:

Backup data, then

apt update
apt upgrade
apt dist-upgrade
reboot

Also disable all non main stream packages if any.

Then preparing APT for new distribution:

sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*

The first command shows error:

apt update
...
Err:6 http://security.debian.org/debian-security bullseye/updates Release
  404  Not Found
Reading package lists... Done
E: The repository 'http://security.debian.org/debian-security bullseye/updates 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.

社区高分解答

原帖链接 · Arunas Bart · CC BY-SA 4.0

This is regarding change in Debian 11 repository structure. RTFM requires time, so bump answer here:

For Debian bullseye, the security suite is now named bullseye-security instead of codename/updates and users should adapt their APT source-list files accordingly when upgrading.

Thus execute one more command:

sed -i 's/bullseye\/updates/bullseye-security/g' /etc/apt/sources.list

Now apt update works great again, and you can continue with upgrade:

sudo apt update
sudo apt upgrade --without-new-pkgs
sudo apt full-upgrade
reboot

Check if system is upgraded:

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye

After successful reboot, you can remove old kernel:

sudo apt purge linux-image-4.19*

Also review log files, for error messages of conflicting configurations or other issues.

Issue list is here: https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.html

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-08-20)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。