解决Debian 8以下系统修改apt源404问题

原因Debian官方删掉了8以下的文件;方法:直接修改为163的。

1、做好备份
mv /etc/apt/sources.list /etc/apt/sources.list.bak

2、编辑/etc/apt/sources.list文件
vi /etc/apt/sources.list

# 在文件最前面,添加以下条目
deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib

下面这个是阿里云的源:
deb http://mirrors.aliyun.com/debian jessie main
deb-src http://mirrors.aliyun.com/debian jessie main
deb http://mirrors.aliyun.com/ jessie/updates main
deb-src http://mirrors.aliyun.com/ jessie/updates main

或者官方的老版本源:
deb http://snapshot.debian.org/archive/debian/20190321T212815Z jessie main
deb-src http://snapshot.debian.org/archive/debian/20190321T212815Z jessie main
deb http://snapshot.debian.org/archive/debian/20190321T212815Z/ jessie/updates main
deb-src http://snapshot.debian.org/archive/debian/20190321T212815Z/ jessie/updates main
deb http://snapshot.debian.org/archive/debian/20190321T212815Z/ jessie-updates main
deb-src http://snapshot.debian.org/archive/debian/20190321T212815Z/ jessie-updates main

3、更新软件源
apt-get update

转自:https://www.hostloc.com/thread-533968-1-1.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注