起因
debian 11 执行更新时提示404
问题出现的原因
从2023年4月23日起,debian的源包地址更换至新地址。
解决办法
执行
nano /etc/apt/sources.list
用一下内容替换
deb http://archive.debian.org/debian/ stretch main contrib non-free
deb-src http://archive.debian.org/debian/ stretch main contrib non-free
deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
然后执行
apt update
更换国内清华源
deb https://mirrors.tuna.tsinghua.edu.cn/debian-multimedia/ bullseye main non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-multimedia/ bullseye main non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-multimedia/ bullseye-backports main
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-multimedia/ bullseye-backports main
更改完 sources.list 文件后请导入 deb-multimedia-keyring ,然后更新索引以生效。
wget https://mirrors.tuna.tsinghua.edu.cn/debian-multimedia/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb
dpkg -i deb-multimedia-keyring_2016.8.1_all.deb
apt-get update