sudo sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
更新前后文件内容:
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
deb http://security.debian.org/ bookworm-security main contrib non-free non-free-firmware
#deb-src http://security.debian.org/ bookworm-security main contrib non-free non-free-firmware
更新后的文件内容:
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
deb http://mirrors.ustc.edu.cn/ bookworm-security main contrib non-free non-free-firmware
#deb-src http://mirrors.ustc.edu.cn/ bookworm-security main contrib non-free non-free-firmware
和 #257 的问题相同,在Debian Bookworm上使用帮助文档提供的sed命令后,/etc/apt/sources.list中的链接不完整,导致无法
apt update
。测试环境: Armbian 24.5.1 Bookworm
使用命令:
更新前后文件内容:
更新后的文件内容:
此时直接使用
apt update
会报404错误,在/etc/apt/sources.list
中手动加上debian-security
后就可以使用了。