Ubuntu镜像源cn.arichinve.ubuntu.com不可用原因分析和解决

您所在的位置:网站首页 女人婚姻线看哪个手掌 Ubuntu镜像源cn.arichinve.ubuntu.com不可用原因分析和解决

Ubuntu镜像源cn.arichinve.ubuntu.com不可用原因分析和解决

2024-07-17 09:41:29| 来源: 网络整理| 查看: 265

@[TOC]今天想要在Ubuntu环境下搭建一个测试环境,进入Ubuntu系统后,先看了下系统版本

Ubuntu查看系统版本 lsb_release -a Ubuntu更新系统不能更新 sudo apt-get update

在执行后,发现报错如下,发现一个很奇怪的现象,我明明记得源配置的是cn.archive.ubuntu.com,但是发现,系统更新时,自动去找了清华大学的Ubuntu源。why?难道是我源配置的是清华的吗?

Err:5 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease 503 Service Unavailable [IP: 185.125.190.52 80] Err:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease 503 Service Unavailable [IP: 101.6.15.130 80] Err:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease 503 Service Unavailable [IP: 101.6.15.130 80] Err:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease 503 Service Unavailable [IP: 101.6.15.130 80] Err:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease 503 Service Unavailable [IP: 101.6.15.130 80] Reading package lists... Done 什么是Ubuntu镜像源

Ubuntu镜像源是指存储Ubuntu发行版安装程序、软件包、和其它发布文件的网络服务器。它们是Ubuntu的非官方副本。

由于Ubuntu官方网站服务器可能过于繁忙而无法及时响应用户的访问请求,因此许多开发人员和爱好者制作了自己的镜像源,并且将它们开放给公众免费使用。

Ubuntu镜像源通常由大量的硬件资源以及高速网络连接支持,以确保Ubuntu用户能够在最短时间内获得所需的软件资源,让用户快速安装Ubuntu系统、更新软件、下载常用的Ubuntu软件包等。

Ubuntu查看APT更新源配置 sudo vim /etc/apt/sources.list

通过VIM编辑器查看,源地址没错,为什么更新的时候去找了清华源呢?

See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://cn.archive.ubuntu.com/ubuntu bionic main restricted # deb-src http://cn.archive.ubuntu.com/ubuntu bionic main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://cn.archive.ubuntu.com/ubuntu bionic-updates main restricted # deb-src http://cn.archive.ubuntu.com/ubuntu bionic-updates main restricted ## 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 bionic universe # deb-src http://cn.archive.ubuntu.com/ubuntu bionic universe deb http://cn.archive.ubuntu.com/ubuntu bionic-updates universe # deb-src http://cn.archive.ubuntu.com/ubuntu bionic-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 bionic multiverse # deb-src http://cn.archive.ubuntu.com/ubuntu bionic multiverse deb http://cn.archive.ubuntu.com/ubuntu bionic-updates multiverse # deb-src http://cn.archive.ubuntu.com/ubuntu bionic-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 bionic-backports main restricted universe multiverse # deb-src http://cn.archive.ubuntu.com/ubuntu bionic-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 bionic partner # deb-src http://archive.canonical.com/ubuntu bionic partner deb http://cn.archive.ubuntu.com/ubuntu bionic-security main restricted # deb-src http://cn.archive.ubuntu.com/ubuntu bionic-security main restricted deb http://cn.archive.ubuntu.com/ubuntu bionic-security universe # deb-src http://cn.archive.ubuntu.com/ubuntu bionic-security universe deb http://cn.archive.ubuntu.com/ubuntu bionic-security multiverse # deb-src http://cn.archive.ubuntu.com/ubuntu bionic-security multiverse cn.archive.ubuntu.com已经自动跳转到清华镜像站

带着很多问号,在浏览器打开http://cn.archive.ubuntu.com,发现网站已经自动跳转到清华镜像站了。在这里插入图片描述以为网站需要https打开,发现该网站无法打开。image.png有知道原因的小伙伴吗?希望大家不吝分享。

Ubuntu变更镜像源地址

虽然访问http://cn.archiv.ubuntu.com会自动跳转到清华源,但是我们还是做一个镜像源地址变更。使用如下命令将镜像文件中的cn.archive.ubuntu.com批量更换为清华源。

备份原文件

变更前记得备份原始的/ etc / apt / sources.list文件

$sudo cp / etc / apt / sources.list / etc / apt / sources.list.bak 批量在VIM中变更

在vim编辑器批量变更字符串,方法如下,按下esc后,输入:

:%s/cn\.archive\.ubuntu\.com/mirrors\.tuna\.tsinghua\.edu\.cn/g

image.png第一次替换时,少打了一个“.”报错提示:E486: Pattern not found。这个报错时指没有找到特定的字符,重新检查错误后,发现"."在正则表达式中通常是特殊字符,所以需要使用\ 来转义它,以确保准确匹配点号。所以,www.csdn.net 转换后,应该时www.csdn.net。这也算是一个语法上的注意事项。

Ubuntu国内镜像站推荐

除了官方的cn.archive.ubuntu.com外,国内还有多个Ubuntu的稳定镜像站。

由于Ubuntu的官方软件仓库位于国外,因此Ubuntu用户在下载软件包或完成系统更新时,需要跨越国际互联网,因此速度较慢,非常耗费网络带宽。因此,为了提高下载速度,许多国内公司和机构建立了自己的Ubuntu软件仓库。这些镜像源位于国内服务器,可以更快地为中国用户提供Ubuntu软件包下载服务。

[ ] 清华大学开源软件镜像站: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ [ ] 阿里巴巴开源镜像站: https://mirrors.aliyun.com/ubuntu/ [ ] Ubuntu官方镜像站: http://archive.ubuntu.com/ubuntu/

当然还有一些其他的,以上三个是我个人觉得比较好用的。上文希望对大家有所帮助。

在Ubuntu操作系统中,Ubuntu镜像源是非常重要的资源和服务。在使用Ubuntu系统过程中,用户可以根据自己的需求和网络情况选择适合自己的Ubuntu镜像源,从而提高软件包下载速度,更好地完成软件更新和安装,让Ubuntu系统保持最新、快速和稳定的状态。

推荐阅读 Ubuntu 多路径服务报错处理方法 Ubuntu Samba高危安全漏洞修复 Windows 11安装Ubuntu 实战教程


【本文地址】

公司简介

联系我们

今日新闻


点击排行

实验室常用的仪器、试剂和
说到实验室常用到的东西,主要就分为仪器、试剂和耗
不用再找了,全球10大实验
01、赛默飞世尔科技(热电)Thermo Fisher Scientif
三代水柜的量产巅峰T-72坦
作者:寞寒最近,西边闹腾挺大,本来小寞以为忙完这
通风柜跟实验室通风系统有
说到通风柜跟实验室通风,不少人都纠结二者到底是不
集消毒杀菌、烘干收纳为一
厨房是家里细菌较多的地方,潮湿的环境、没有完全密
实验室设备之全钢实验台如
全钢实验台是实验室家具中较为重要的家具之一,很多

推荐新闻


    图片新闻

    实验室药品柜的特性有哪些
    实验室药品柜是实验室家具的重要组成部分之一,主要
    小学科学实验中有哪些教学
    计算机 计算器 一般 打孔器 打气筒 仪器车 显微镜
    实验室各种仪器原理动图讲
    1.紫外分光光谱UV分析原理:吸收紫外光能量,引起分
    高中化学常见仪器及实验装
    1、可加热仪器:2、计量仪器:(1)仪器A的名称:量
    微生物操作主要设备和器具
    今天盘点一下微生物操作主要设备和器具,别嫌我啰嗦
    浅谈通风柜使用基本常识
     众所周知,通风柜功能中最主要的就是排气功能。在

    专题文章

      CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭