Debian7:
cp -r /etc/apt/sources.list /etc/apt/sources.list.bak;echo "deb http://archive.debian.org/debian/ wheezy main contrib non-free" > /etc/apt/sources.list;cat /etc/apt/sources.list;apt-get update;
Debian8:
cp -r /etc/apt/sources.list /etc/apt/sources.list.bak;echo -e "deb [trusted=yes] http://archive.kernel.org/debian-archive/debian jessie main contrib non-free\ndeb [trusted=yes] http://archive.kernel.org/debian-archive/debian jessie-backports main contrib non-free" > /etc/apt/sources.list;cat /etc/apt/sources.list;apt-get update;
Debian9:
cp -r /etc/apt/sources.list /etc/apt/sources.list.bak;echo -e "deb http://archive.debian.org/debian stretch main\ndeb-src http://archive.debian.org/debian stretch main\ndeb http://archive.debian.org/debian-security stretch/updates main\ndeb-src http://archive.debian.org/debian-security stretch/updates main" > /etc/apt/sources.list;cat /etc/apt/sources.list;apt-get update;
说明:
1.如果遇到无法安装或验证问题
vi /etc/apt/apt.conf
按 i
将下面内容粘贴进去
Get::AllowUnauthenticated true;
Acquire::Check-Valid-Until false;
随后按esc结束编辑后输入:wq
保存编辑
2.如果出现GPG错误,可以参考这个:https://bobqu.cyou/2021/09/11/53.html