在ubuntu中替换清华源时候遇到的问题

清华源: https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/

先备份默认的官方源

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

sudo vi /etc/apt/sources.list
把上面的链接拷贝到文件中去:

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

apt-get update
发现更新失败

E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

因为默认的源是 http 的,但是准备使用的镜像源是 https 的,所以需要额外的安装有关 HTTPS 的包

所以安装这两个包之后就可以正常拉取https的源了:

sudo apt install apt-transport-https

sudo apt install ca-certificates

ubuntu 替换清华源遇到的问题-不能更新,无法拉取 https 源解决相关推荐

  1. 在Ubuntu 20.04系统里安装Flatpak软件应用无图标显示问题的解决

    解决思路:手动将图标添加到系统默认的路径下面 以在Flatpak下安装VSCode为例,可手动将 /var/lib/flatpak/app/com.visualstudio.code/current/ ...

  2. 部署问题集合(十一)Docker国内镜像源也无法拉取镜像

    步骤 修改DNS配置:vi /etc/resolv.conf 添加nemeserver:8.8.8.8或223.5.5.5 保存关闭 重启虚拟机:reboot

  3. 2023全新在线授权系统源码V3.7全开源无加密版,完美可用支持二次开发

    源码介绍: 今天分享的是一款2023全新授权系统源码V3.7全开源无加密版本.源码搭建很简单,把域名解析到站点后上传源码解压,访问域名/install就能直接安装. 程序功能简介: 1.盗版入库(26 ...

  4. Ubuntu设置清华源

    为了在Ubuntu下安装软件快些,需要使用国内的源,比如清华源.步骤如下: 一:备份源文件 cd /etc/apt/ 然后会显示下面的源文件sources.list 输入命令行:(cp为copy的意思 ...

  5. Ubuntu更换清华源 apt

    Ubuntu更换清华源 Ubuntu自带的apt软件源有时下载缓慢,可替换为清华大学镜像地址(也可搜索阿里源等). 源文件为 /etc/apt/sources.list .替换方法如下: 替换步骤 首 ...

  6. Ubuntu更换清华TUNA软件源

    软件源配置文件 Ubuntu 的软件源配置文件是 /etc/apt/sources.list. 换源 使用以下命令查看Ubuntu版本: cat /proc/version 使用以下命令将/etc/a ...

  7. Ubuntu使用清华源( 镜像)步骤官方教程 帮助

    Ubuntu使用清华源( 镜像)步骤官方教程 帮助 很多东西明明是看过,但就是忘记在哪里有,那就记录下来吧,下次好找. ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghu ...

  8. 给Ubuntu添加清华的软件源

    找到 sources.list 文件 cd /etc/apt/ 编辑 vim sources.list 在最后面加上下面这几条语句 # 默认注释了源码镜像以提高 apt update 速度,如有需要可 ...

  9. ubuntu使用清华源pip安装pytorch

    在pytorch官网选择合适的版本 https://pytorch.org/ 更改下载指令 这里选择下载cpu版 pytorch官网给出的命令为: pip install torch==1.7.1+c ...

  10. ubuntu更换清华源

    进入:清华大学开源软件镜像站 | Tsinghua Open Source Mirror 选择你的ubuntu版本 vi /etc/apt/sources.list 如果执行apt update 报镜 ...

最新文章

  1. it项目经理带一个项目的完整_如何控制IT项目需求范围?千万别让用户把你带沟里……...
  2. Alpha阶段第2周/共2周 Scrum立会报告+燃尽图 04
  3. 音频文件 数据库存储_数据库系统是什么?它由哪几部分组成?
  4. checkbox已设置为checked--true-但不勾选问题解决方法(只第一次勾选有效)
  5. pandas dataframe统计填充空值大全
  6. NEON码农指导 Chapter 3 : NEON Instruction Set Architecture
  7. Ectouch修改虚拟销售数量的方法
  8. 批量创建钱包地址并保存私钥
  9. firefox主页被360篡改_IE浏览器主页被劫持,如何解决主页被篡改问题?
  10. Ubuntu系统下载网易云音乐
  11. 利用Gitee搭建免费图床(详细教程)
  12. 统计知识基础(三)常用构造估计量的两种方法——矩估计、最大似然估计
  13. 和导师的微信聊天翻车现场,你一定也经历过!
  14. python反距离权重法_使用Python进行反距离加权(IDW)插值
  15. 2019年寒假集训-二分专题
  16. android雪花飘落效果,【OpenGL】Shader实例分析(七)- 雪花飘落效果
  17. there can be only one auto column and it must be defined as a key原因以及解决办法
  18. Android编译详解之lunch命令
  19. 复数的加减乘除及开方乘方运算
  20. GX Work2 三菱 FX-Q系列IP地址配置

热门文章

  1. 全国计算机考试满分是多少,中考计算机多少分满分?中考计算机考试分数是多少...
  2. wpf制作旋转小方块
  3. IT十大风云人物(转水冰洋)
  4. itextpdf处理PDF,用文本域的方式
  5. ros文件服务器,ros设置_服务器应用_Linux公社-Linux系统门户网站
  6. 医疗CT断层图像DICOM标准和工业CT断层图像DICONDE标准
  7. 什么软件可以测试手长,手相测试扫一扫软件
  8. [生存志] 第26节 历代大事件概览 明朝
  9. 初学者如何学习好嵌入式开发?讲解嵌入式学习教程
  10. 电信光纤猫虚拟服务器设置方法,电信光纤猫怎么设置宽带拨号?