Ubuntu更换镜像源

Ubuntu更换镜像源

  • 镜像源设置文件
  • 镜像源设置
    • focal版本镜像源设置
    • bionic版本镜像源设置
  • 更新源
  • 问题

镜像源设置文件

备份镜像源设置文件

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

编辑镜像源设置文件

sudo gedit /etc/apt/sources.list

镜像源设置

Ubuntu有不同的系统版本,对于不同的版本而言,需要设置的镜像源也略有差异。

使用以下命令可查看自己的Ubuntu系统版本:

lsb_release -a  # 显示相关信息
lsb_release -c  # 只显示版本信息

focal版本镜像源设置

阿里源

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

清华源

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse

bionic版本镜像源设置

阿里源

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

清华源

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
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

中科大源

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

更新源

设置好镜像源之后,使用以下命令进行更新:

sudo apt-get update
sudo apt-get upgrade

问题

在使用Linux的时候碰到过一个已经解决的问题,问题如下:

下列软件包有未满足的依赖关系:
aptitude : 依赖:libapt-pkg5.0 (>= 1.1) 但是它将不会被安装推荐:libparse-debianchangelog-perl 但是它将不会被安装

产生上述问题的根源,可能是由于镜像源设置的不正确,也就是说设置的镜像源跟Ubuntu的系统版本不匹配;设置与系统版本相匹配的镜像源即可解决该问题。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/127177.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

STM32:使用蓝牙模块

一、蓝牙概要 蓝牙是一种常见的无线通信协议,通常用于短距离通信。蓝牙分为经典蓝牙和低功耗蓝牙(BLE)。经典蓝牙通常用于需要持续传输数据的设备,比如蓝牙耳机等。低功耗蓝牙通常用于只需要间歇性传输数据的设备,比如运动手环。 蓝牙…

python脚本监听域名证书过期时间,并将通知消息到钉钉

版本一: 执行脚本带上 --dingtalk-webhook和–domains后指定钉钉token和域名 python3 ssl_spirtime.py --dingtalk-webhook https://oapi.dingtalk.com/robot/send?access_tokenavd345324 --domains www.abc1.com www.abc2.com www.abc3.com脚本如下 #!/usr/bin…

实现基于 Azure DevOps 的数据库 CI/CD 最佳实践

数据库变更一直是整个应用发布过程中效率最低、流程最复杂、风险最高的环节,也是 DevOps 流程中最难以攻克的阵地。那我们是否能在具体的 CI/CD 流程中,像处理代码那样处理数据库变更呢? DORA 调研报告 DORA(DevOps Research &am…

.net 写了一个支持重试、熔断和超时策略的 HttpClient 实例池

using System; using System.Collections.Concurrent; using System.Net.Http; using System.Threading; using System.Threading.Tasks;/// <summary> /// 表示一个支持重试、熔断和超时策略的 HttpClient 实例池。 /// </summary> public class HttpClientPool :…

ESXI 的 OVF 文件编辑 方法。

方法一&#xff1a; 用Wrar解压OVF 文件&#xff0c;得到4个文件&#xff1b; 用记事本编辑 ".mf" 或 ".ovf" 文件保存退出&#xff0c;后续全部导入虚拟机ESXI。 方法二&#xff1a;要打开 OVF 文件并在其中查找清单文件 &#xff0c; 你可以按照以下步骤…

Android studio进入手机调试状态

首先usb插入电脑手机打开开发者模式进入点击就会在你的页面显示了

SpringCloud(二) Eureka注册中心的使用

在SpringCloud(一)中,我们学会了使用RestTemplate进行远程调用,但是在调用user-service时候需要在order-service中发送http请求,请求中需要书写对应微服务的ip和端口号,十分不方便,如果此时有多个user-service实例的话,就不知道调用哪个了(除非每次调用的时候都对ip和端口号进行…

设计模式(单例模式、工厂模式及适配器模式、装饰器模式)

目录 0 、设计模式简介 一、单例模式 二、工厂模式 三、适配器模式 四、装饰器模式 0 、设计模式简介 设计模式可以分为以下三种: 创建型模式&#xff1a;用来描述 “如何创建对象”&#xff0c;它的主要特点是 “将对象的创建和使用分离”。包括单例、原型、工厂方法、…

数据仓库-拉链表

在数据仓库中制作拉链表&#xff0c;可以按照以下步骤进行&#xff1a; 确定需求&#xff1a;首先明确需要使用拉链表的场景和需求。例如&#xff0c;可能需要记录历史数据的变化&#xff0c;以便进行时间序列分析等。设计表结构&#xff1a;在数据仓库中&#xff0c;拉链表通…

AutoX-对象、图片资源懒加载+Storage持久化

AutoX-对象、图片资源懒加载Storage持久化 一、使用场景 需要懒加载的场景有很多&#xff0c;我最开始是需要懒加载功能是在编写一个游戏自动化脚本时&#xff0c;需要事先检测某个物品的坐标&#xff0c;才能进行后续的点击操作&#xff0c;该物品在页面中的位置是固定的&am…

[SpringCloud | Linux] CentOS7 部署 SpringCloud 微服务

目录 一、环境准备 1、工具准备 2、虚拟机环境 3、Docker 环境 二、项目准备 1、配置各个模块&#xff08;微服务&#xff09;的 Dockerfile 2、配置 docker-compose.yml 文件 3、Maven 打包 4、文件整合并传输 三、微服务部署 1、部署至 Docker 2、访问微服务 四…

折纸达珠峰高度(forwhile循环、闭包函数循环)

对折0.1mm厚度的纸张多少次&#xff0c;高度可达珠峰高度8848180mm。 (本笔记适合熟悉循环和列表的 coder 翻阅) 【学习的细节是欢悦的历程】 Python 官网&#xff1a;https://www.python.org/ Free&#xff1a;大咖免费“圣经”教程《 python 完全自学教程》&#xff0c;不仅…

使用 Docker 部署高可用 MongoDB 分片集群

使用 Docker 部署 MongoDB 集群 Mongodb 集群搭建 mongodb 集群搭建的方式有三种&#xff1a; 主从备份&#xff08;Master - Slave&#xff09;模式&#xff0c;或者叫主从复制模式。副本集&#xff08;Replica Set&#xff09;模式。分片&#xff08;Sharding&#xff09;…

vue图书馆书目推荐数据分析与可视化-计算机毕业设计python-django-php

建立本图书馆书目推荐数据分析是为了通过系统对图书数据根据算法进行的分析好推荐&#xff0c;以方便用户对自己所需图书信息的查询&#xff0c;根据不同的算法机制推荐给不同用户不同的图书&#xff0c;用户便可以从系统中获得图书信息信息。 对用户相关数据进行分析&#xff…

C#,数值计算——积分方程与逆理论Quad_matrix的计算方法与源程序

1 文本格式 using System; namespace Legalsoft.Truffer { public class Quad_matrix : UniVarRealMultiValueFun { private int n { get; set; } private double x { get; set; } public Quad_matrix(double[,] a) { this.n a…

Linux越学越头疼,我要怎么办?

最近&#xff0c;听到一些同学说&#xff0c;“Linux越学越头疼”。其实这句话&#xff0c;在我之前刚接触Linux的时候&#xff0c;也是深有感触。Linux越学越不明所以。最后干脆放弃学习&#xff0c;转而学习其他东西。 其实大家在初学Linux的时候&#xff0c; 有这个感受&am…

ES6对象扩展

ES6对象扩展是指在ES6中新增的一些对象属性和方法&#xff0c;包括对象属性的简写、计算属性名、对象方法的简写、对象的可迭代性、拓展运算符等。 下面是一些常用的ES6对象扩展&#xff1a; 对象属性的简写 ES6中&#xff0c;当对象的属性名和赋值变量名相同时&#xff0c;…

四川达州-全国先进计算创新大赛总结

目录 四川达州-全国先进计算创新大赛 1.三个算法&#xff0c;第三个原创的&#xff1f;&#xff08;国内对比&#xff09; 2.方案的实际落地应用&#xff1f;&#xff08;落地应用&#xff09; 3.农业数据采集有问题&#xff08;数据采集汇总&#xff09;&#xff0c;很难…

应用软件安全编程--03净化传递给 Runtime.exec() 方法的非受信数据

每个 Java 应用都有一个 Runtime 类的实例&#xff0c; 一般需要使用 shell 时调用它&#xff0c;从而可以在 POSIX 中 使用/bin/sh 或者在Windows 平台中使用cmd.exe。 当参数中包含以空格、双引号或者其他以一/开头 的用来表示分支的字符时&#xff0c;就可能发生参数注入攻…

【Tomcat Servlet】如何在idea上部署一个maven项目?

目录 1.创建项目 2.引入依赖 3.创建目录 4.编写代码 5.打包程序 6.部署项目 7.验证程序 什么是Tomcat和Servlet? 以idea2019为例&#xff1a; 1.创建项目 1.1 首先创建maven项目 1.2 项目名称 2.引入依赖 2.1 网址输入mvnrepository.com进入maven中央仓库->地址…