1.打开 vim /etc/apt/sources.list

2.添加清华源。

对应ubuntu版本清华源可在https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/找到。

在sources.list最后加入对应系统版本的源地址。如:18.04的地址为

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

3.保存 :wq

4.执行 apt-get update

如果出现如下报错,将添加的源地址中的https改为http即可。

如果修改后依旧报错,则安装apt install apt-transport-https

                                                apt install ca-certificates

                               

E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic 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 bionic-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 bionic-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 bionic-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.

Ubuntu设置apt源相关推荐

  1. ubuntu 设置清华源、阿里云源

    撸了今年阿里.头条和美团的面试,我有一个重要发现.......>>> https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/ Ubuntu ...

  2. Ubuntu 更改apt 源

    在Ubuntu系统中,维护着一个源列表,源列表里面存放着一些网址信息,每一条网址指向一个源服务器,我们需要的软件就存放在这些源服务器上. Ubuntu系统默认使用的apt源是国外的源服务器,这导致我们 ...

  3. Ubuntu更换apt源之arm版

    参考:ubuntu的arm源_PlainJi的博客-CSDN博客_ubuntuarm源 在linux上开发时,更换apt源是很常规的操作,如果对源的理解不透彻,更换不成功后都不知道是什么原因,就是换着 ...

  4. Ubuntu更换apt源为阿里源

    文章目录 一.前言 二.配置阿里源 一.前言 Ubuntu 默认自带的源好不好用就不多说了,速度摆在那里,在国内的话,个人感觉还是阿里源好用. 二.配置阿里源 修改我们系统默认自带的 apt 源,这里 ...

  5. Windows10上安装Kali并设置apt源

    打开适用于Linux的Windows子系统 直接搜Window功能 打开开发者模式 搜索WSL 下载安装Kali 启动kali,配置账号密码,然后切换到root账号 配置apt源 apt-get和yu ...

  6. ubuntu设置软件源

    此处以阿里源设置为例: 1.在系统路径/etc/apt/下将原来的sources.list进行备份,之后需要修改的就是该文件2.将该文件内容修改为如下内容: deb http://mirrors.al ...

  7. Ubuntu 修改apt 源

    2019独角兽企业重金招聘Python工程师标准>>> 方法: 1.修改源地址: cp /etc/apt/sources.list /etc/apt/sources.list.bak ...

  8. Ubuntu设置清华源

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

  9. ubuntu 更新 apt 源

    参考:https://mirrors.cnnic.cn/help/ubuntu/ sudo sed -i "s@http://.*archive.ubuntu.com@https://mir ...

最新文章

  1. Androidstudio下Generate signed apk提示Error: Expected resource of type id [ResourceType]解决办法...
  2. 调用加了SSL签名的WebService
  3. 【Linux】8.安装tensorrt和遇到的问题及解决方法
  4. python基础学习教程:Python基础语法
  5. html调用deeplink,如何优雅地从浏览器打开本地应用deeplink
  6. easyui 排序实现
  7. Docker网络-(六)
  8. Solr分析器IK-analyzer配置及错误java.lang.AbstractMethodError解决
  9. Emacs学习笔记(8): 使用emacs浏览网页
  10. Java中通过js简单的调用高拍仪和扫描仪
  11. 关于Hilbert矩阵的几道编程题
  12. SpringBoot文件上传文件大小限制The field file exceeds its maximum permitted size of 1048576 bytes.
  13. 计算机网络pop3是什么意思,smtp服务器是什么 pop3服务器是什么?
  14. raid5换硬盘显示ready_服务器RAID磁盘坏道修复实战
  15. 数据库和 MIDP,第一部分:了解记录管理系统
  16. 单一窗口关区备案_【亚东关务】单一窗口集中申报来了,集报备案、集报清单详细操作手册...
  17. 科技爱好者周刊(第 194 期):悲观者正确,乐观者成功
  18. MySQL数据库视图:视图定义、创建视图、修改视图
  19. 光标快速移动到文档尾部_在Word文档中,把光标移动到文件尾部的快捷键是__________。...
  20. Layui前端框架教程_layui视频教程_Layui使用教程

热门文章

  1. ssm查询,错误Could not find result map cn.itcast.ssm.po.ItemsCustom
  2. 中国空巢青年达2000万 一线城市成单身人群聚集地
  3. WCF学习——掀开你的盖头来
  4. 数据之道读书笔记-06面向“自助消费”的数据服务建设
  5. 树莓派脑壳疼问题解决:终端pip3 list中查看库是存在的,但是运行却报错ModuleNotFoundError: No module named ‘keyboard‘
  6. 车站计算机英语,车站的英文怎么读
  7. 用easyPoi导出excel,带多sheet,合并单元格,合计,单元格金额类型
  8. Android程序如何读取手机联系人
  9. 论文《Low Compute and Fully Parallel Computer Vision with 哈希匹配》学习
  10. linux应用程序开发题库,Linux应用程序开发练习题ppt课件