<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/ DTD/wml_1.1.xml">

<wml>
<head>
<meta http-equiv="cache-control" content="max-age=180,private" />
</head>
<card title="Debian9等老版本Debian系统apt镜像源问题">
<p>
作者:<a href="index.php?action=showuser&amp;userid=1&amp;hash=">admin</a><br />时间:2024-07-15 10:36<br />分类:<a href="index.php?action=list&amp;cid=3&amp;hash=">电脑技术</a><br />内容:
Debian9等老版本Debian系统apt镜像源问题


由于Debian9在22年官方停服，所以sources.list需要改成带archive的路径，如下：




XML/HTML代码


    deb http://archive.debian.org/debian/ stretch main non-free contrib

    deb-src http://archive.debian.org/debian/ stretch main non-free contrib

    deb http://archive.debian.org/debian-security/ stretch/updates main non-free contrib

    deb-src http://archive.debian.org/debian-security/ stretch/updates main non-free contrib

    deb http://archive.debian.org/debian/ stretch-backports main non-free contrib

    deb-src http://archive.debian.org/debian/ stretch-backports main non-free contrib





相应的阿里云镜像也要跟上archive的，如下：






XML/HTML代码


    deb http://mirrors.aliyun.com/debian-archive/debian stretch main contrib non-free

    deb http://mirrors.aliyun.com/debian-archive/debian stretch-proposed-updates main non-free contrib

    deb http://mirrors.aliyun.com/debian-archive/debian stretch-backports main non-free contrib

    deb http://mirrors.aliyun.com/debian-archive/debian-security stretch/updates main contrib non-free

    deb-src http://mirrors.aliyun.com/debian-archive/debian stretch main contrib non-free

    deb-src http://mirrors.aliyun.com/debian-archive/debian stretch-proposed-updates main contrib non-free

    deb-src http://mirrors.aliyun.com/debian-archive/debian stretch-backports main contrib non-free

    deb-src http://mirrors.aliyun.com/debian-archive/debian-security stretch/updates main contrib non-free





一、选择Archive源


目前Debian archive官方源及国内镜像主要有以下几个，按照推荐的顺序自上而下排列。翻看了一圈国内的镜像站发现archive非商业源很少，商业源中阿里云较为稳定但目前对外限速非常严重，不推荐使用。






官方（海外）：http://archive.debian.org/


腾讯云：http://mirrors.cloud.tencent.com/debian-archive/


南京大学：https://mirror.nju.edu.cn/debian-archive/


软件所：https://mirror.iscas.ac.cn/debian-archive/


网易163：http://mirrors.163.com/debian-archive/


阿里云：http://mirrors.aliyun.com/debian-archive/


二、配置镜像源


Debian的镜像源主要分为主线、updates、backports三项。已经过了支持期的老旧系统，要更新还是建议更新到在支持期内的新系统。backports源中的内容是将新版本的某些功能移植到旧版本软件上，如果你不知道它的作用也不必添加。所以一般情况下仅配置主源就够了，再按照需求决定是否添加backports源。目前Debian9和之前系统都已经停服，必须使用以上Archive源，Debian10的backports也已经停服，源中backports的地址也必须替换成上面的Archive源地址。






XML/HTML代码


    deb http://mirrors.ustc.edu.cn/debian/ buster main contrib non-free

    deb-src http://mirrors.ustc.edu.cn/debian/ buster main contrib non-free

     

    deb http://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free

    deb-src http://mirrors.ustc.edu.cn/debian/ buster-updates main contrib non-free

     

    deb http://archive.debian.org/debian buster-backports main contrib non-free

     

    deb http://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free

    deb-src http://mirrors.ustc.edu.cn/debian-security/ buster/updates main contrib non-free




例如Debian10使用中科大源，必须进行修改才可以进行内核升级。


注意：具体各家源对系统版本支持需要看他们官方说明，为了保险，尽可能使用Debian官方的源，版本最全，最稳定可靠。
</p><p>
<a href="index.php?action=login&amp;hash=">立即登陆发表评论</a><br />
</p>
<p><a href="index.php?action=list&amp;hash=">返回日志列表</a><br /><a href="index.php?action=index&amp;hash=">返回主页</a></p>
</card>
</wml>
