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

sudo sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
sudo sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list.d/stretch-backports.list
sudo sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list
sudo 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 [arch=amd64] https://download.docker.com/linux/debian stretch stable
deb-src http://archive.debian.org/debian-security stretch/updates main
Last modification:May 9, 2023
If you think my article is useful to you, please feel free to appreciate