Debian 官方源失效了(太老放入存档了),导致更新和安装软件失败.
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;
其实就是把源修改为: http://archive.debian.org/debian/
发现的几个其他可用源,如果http://archive.debian.org/debian/太慢可以自己换换
# 阿里云的,目前可用,但可能是没同步好,过几天就和官方的同步了,就不行了.
http://mirrors.aliyun.com/debian/
# debian官方的存档
https://snapshot.debian.org/archive/debian/20190321T212815Z/
# 这里可以找到不少(其实只要点进去看看dists目录里有没有wheezy就知道了)
https://www.debian.org/distrib/archive
一键方案不明白的话,这是阿里云给的详细帮助,阿里云如果失效的话自己替换相关源的网址即可.
debian 7.x (wheezy)
编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份)
deb http://mirrors.aliyun.com/debian/ wheezy main non-free contrib
deb http://mirrors.aliyun.com/debian/ wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ wheezy main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ wheezy-proposed-updates main non-free contrib
debian 8.x (jessie)
编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份)
deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib
deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib