Ubuntu20.04.5 没有配置清华源, update 什么是清华源? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
sbldehanhan
V2EX    Linux

Ubuntu20.04.5 没有配置清华源, update 什么是清华源?

  •  
  •   sbldehanhan 2023-10-17 10:33:31 +08:00 3754 次点击
    这是一个创建于 774 天前的主题,其中的信息可能已经有所发展或是发生改变。

    就是刚装完,没有任何修改。apt 目录下也没有 singhua 字样。但是用 apt update 输出显示有 tsinghua 源。咋回事?

    26 条回复    2023-10-19 11:03:03 +08:00
    cheng6563
        1
    cheng6563  
       2023-10-17 10:47:36 +08:00
    ubuntu 桌面版是有自动选择当地源的功能的
    anytk
        2
    anytk  
       2023-10-17 10:49:57 +08:00
    ubuntu 的 cn 源 http://cn.archive.ubuntu.com/ubuntu/ 你打开试试看?
    sbldehanhan
        3
    sbldehanhan  
    OP
       2023-10-17 10:57:31 +08:00
    @cheng6563 #1 那它不会添加到 source.list 文件中吗?
    sbldehanhan
        4
    sbldehanhan  
    OP
       2023-10-17 11:01:50 +08:00
    @anytk #2 这个怎么看?从哪儿看出来有清华源?
    czphoenix
        5
    czphoenix  
       2023-10-17 11:28:56 +08:00
    /etc/apt/sources.list.d 里面也没有吗?
    dangyuluo
        6
    dangyuluo  
       2023-10-17 11:31:22 +08:00
    是不是返回了一个 304 跳转
    sbldehanhan
        7
    sbldehanhan  
    OP
       2023-10-17 11:42:44 +08:00
    @czphoenix #5 没有。我 grep 了整个 apt 目录,没有发现 tsinghua 的字段。
    sbldehanhan
        8
    sbldehanhan  
    OP
       2023-10-17 11:44:01 +08:00
    @dangyuluo #6 没有。一切正常,可以更新缓存。我好奇他到底配置到哪儿了。
    ysc3839
        9
    ysc3839  
       2023-10-17 13:19:02 +08:00 via Android
    看看/etc/apt/sources.list 内容?
    sbldehanhan
        10
    sbldehanhan  
    OP
       2023-10-17 13:52:13 +08:00
    @ysc3839 #9
    ```
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://cn.archive.ubuntu.com/ubuntu/ focal universe
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ focal universe
    deb http://cn.archive.ubuntu.com/ubuntu/ focal-updates universe
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-updates universe

    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://cn.archive.ubuntu.com/ubuntu/ focal multiverse
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ focal multiverse
    deb http://cn.archive.ubuntu.com/ubuntu/ focal-updates multiverse
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-updates multiverse

    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://cn.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
    # deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu focal partner
    # deb-src http://archive.canonical.com/ubuntu focal partner

    deb http://security.ubuntu.com/ubuntu focal-security main restricted
    # deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
    deb http://security.ubuntu.com/ubuntu focal-security universe
    # deb-src http://security.ubuntu.com/ubuntu focal-security universe
    deb http://security.ubuntu.com/ubuntu focal-security multiverse
    # deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
    ```
    都是自带的,我没改过。
    vicacheung
        11
    vicacheung  
       2023-10-17 13:52:14 +08:00
    @sbldehanhan 使用 cn 源会转到使用清华源
    sbldehanhan
        12
    sbldehanhan  
    OP
       2023-10-17 13:54:53 +08:00
    @vicacheung #11 是吗?那以后是不是不需要手动换源了?
    263
        13
    263  
       2023-10-17 14:08:16 +08:00   1
    cn.archive.ubuntu.com 是镜像归档,会判定包含在内的源,优先连接延迟最低的

    http://mirrors.ubuntu.com/CN.txt
    vicacheung
        14
    vicacheung  
       2023-10-17 14:09:50 +08:00
    @sbldehanhan 是吧,有时候发现会使用阿里云作为 cn 源
    ziwen1943
        15
    ziwen1943  
       2023-10-17 14:14:55 +08:00
    Ubuntumirror 会自行选择最快的 mirror 源获取 package list,这是 ubuntu 易用性设计,类似的 centos-fast-mirror 也会通过插件获取最快的 mirror 源,思路差不多,检测到你是默认的 mirror 之后就会给你自行遍历最快网络源,提高使用效率。
    ziwen1943
        16
    ziwen1943  
       2023-10-17 14:16:18 +08:00
    ubuntu-server 版我没遇到这种,估摸是 desktop 页面插件内置逻辑实现的 mirror 遍历。
    laduary
        17
    laduary  
       2023-10-17 14:21:05 +08:00
    看到帖子之后 ping 了一下,cn.archive.ubuntu.com 这个域名被解析到 mirror.xtom.com.hk 上了。而且 xtom 这个镜像不在 http://mirrors.ubuntu.com/CN.txt 列表上。我记得 xtom 镜像是屏蔽大陆访问的。

    用全国 ping 工具又试了一下,发现统一解析到 xtom 了。https://www.itdog.cn/ping/cn.archive.ubuntu.com
    sbldehanhan
        19
    sbldehanhan  
    OP
       2023-10-17 14:35:56 +08:00
    @unclemcz #18 我开代理不跳,关了代理就跳到清华源了。应该是楼上大哥说的那种机制。
    LinePro
        20
    LinePro  
       2023-10-17 14:36:43 +08:00
    curl.exe -vvv http://cn.archive.ubuntu.com/ubuntu/
    * Trying [2403:2c80:5::6]:80...
    * Connected to cn.archive.ubuntu.com (2403:2c80:5::6) port 80 (#0)
    > GET /ubuntu/ HTTP/1.1
    > Host: cn.archive.ubuntu.com
    > User-Agent: curl/8.0.1
    > Accept: */*
    >
    < HTTP/1.1 302 Moved Temporarily
    < Server: nginx
    < Date: Tue, 17 Oct 2023 06:35:57 GMT
    < Content-Type: text/html
    < Content-Length: 138
    < Connection: keep-alive
    < Location: http://mirrors.tuna.tsinghua.edu.cn/ubuntu/
    sbldehanhan
        21
    sbldehanhan  
    OP
       2023-10-17 14:36:44 +08:00
    @ziwen1943 #16 了解了,感谢。
    unclemcz
        22
    unclemcz  
       2023-10-17 14:44:31 +08:00 via Android
    @sbldehanhan 应该是 cn.archive.ubuntu 服务端控制回源地址的选择。
    MIUIOS
        23
    MIUIOS  
       2023-10-17 17:49:20 +08:00
    新版本的 ubuntu 不用改源的了 默认会用国内的了
    sbldehanhan
        24
    sbldehanhan  
    OP
       2023-10-18 09:20:54 +08:00
    @totoro52 #23 我的是 20.04 ,不是新版本,也会跳到清华源。应该是服务端做了重定位。
    asdf12303116
        25
    asdf12303116  
       2023-10-18 14:31:33 +08:00
    我记得 cn.archive.ubuntu.com 这个域名是解析到 xtom 的镜像站的,xtom 镜像站 block 大陆 IP 地址,大陆 IP 会直接给 302 跳转到清华源
    sbldehanhan
        26
    sbldehanhan  
    OP
       2023-10-19 11:03:03 +08:00
    @asdf12303116 #25 一直这样吗?还是最近改的?以前没注意,都是直接换国内源。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2736 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 26ms UTC 06:35 PVG 14:35 LAX 22:35 JFK 01:35
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86