最近Debian9源失效了,无法更新,查了一下,原来是地址变了,替换一下就好了

sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list.d/stretch-backports.list
sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list
sed -i '/stretch-updates/d' /etc/apt/sources.list

或者手动更新一下源

vi /etc/apt/sources.list

#按i进入编辑模式,复制下面的源替换进去,随后按:wq结束编辑并保存

deb http://archive.debian.org/debian stretch main
deb-src http://archive.debian.org/debian stretch main
deb http://archive.debian.org/debian-security stretch/updates main
deb-src http://archive.debian.org/debian-security stretch/updates main
Last modification:December 23, 2023
If you think my article is useful to you, please feel free to appreciate