Ubuntu解决Failed to fetch https://... Could not resolve ‘某个源‘

在我使用sudo apt install subversion的时候遇到报错:

这个报错与Ubuntu操作系统的软件源配置文件有关系。错误提示显示无法解析“mirrors.shanhe.com”地址,这可能是由于更新软件包列表或下载软件包时出现的网络问题。

1.可以先更新一下源试试:

sudo apt-get update

如果不能解决,就换一个源,这个没关系的,方法如下:

sudo nano /etc/apt/sources.list

然后将https://mirrors.shanhe.com/ubuntu源替换,我这里替换的是清华的:https://mirrors.tuna.tsinghua.edu.cn/ubuntu

还有其他可用:

  • https://mirrors.aliyun.com/ubuntu:阿里云镜像站点
  • https://mirrors.tuna.tsinghua.edu.cn/ubuntu:清华大学TUNA镜像站点
  • https://mirrors.ustc.edu.cn/ubuntu:中国科学技术大学镜像站点
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal main restricted
# deb-src https://mirrors.shanhe.com/ubuntu focal main restricted## Major bug fix updates produced after the final release of the
## distribution.
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates main restricted
# deb-src https://mirrors.shanhe.com/ubuntu focal-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 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal universe
# deb-src https://mirrors.shanhe.com/ubuntu focal universe
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates universe
# deb-src https://mirrors.shanhe.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 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal multiverse
# deb-src https://mirrors.shanhe.com/ubuntu focal multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates multiverse
# deb-src https://mirrors.shanhe.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 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports main restricted universe multiverse
# deb-src https://mirrors.shanhe.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 partnerdeb https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security main restricted
# deb-src https://mirrors.shanhe.com/ubuntu focal-security main restricted
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security universe
# deb-src https://mirrors.shanhe.com/ubuntu focal-security universe
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security multiverse
# deb-src https://mirrors.shanhe.com/ubuntu focal-security multiverse

更改结束后如果直接安装东西还是会出现👇

这是因为 没更新

sudo apt-get update

这样,问题解决~ 

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

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

相关文章

Vue 子传父 组件传参 defineEmits

defineEmits 属性:用于创建自定义事件,接收子组件传递过来的数据。 注意:如果自定义事件的名称,和原生事件的名称一样,那么只会触发自定义事件。 defineEmits 仅适用于 setup 语法糖,其它写法请见&#x…

SpringBoot+SSM项目实战 苍穹外卖(5)(Redis入门)

继续上一节的内容,本节学习Redis,并实现营业状态设置功能。 目录 Redis环境搭建Redis数据类型Redis常用命令在Java中操作Redis环境搭建java操作常见类型数据 店铺营业状态设置设置营业状态管理端查询营业状态用户端查询营业状态swagger区分管理端和用户端…

CSAPP/ICS 系统级IO笔记

文件描述符:内核(kernel)利用文件描述符(file descriptor)来访问文件。文件描述符是非负整数。打开现存文件或新建文件时,内核会返回一个文件描述符。读写文件也需要使用文件描述符来指定待读写的文件。 每…

Python移动未标注的图片数据集

Python移动未标注的图片数据集 前言前提条件相关介绍实验环境Python移动未标注的图片数据集情况一:有图,无标注文件代码实现输出结果 情况二:有图,有标注文件,但标注信息为空代码实现输出结果 情况一与情况二同时都考虑…

LabVIEW开发电能质量监测系统

LabVIEW开发电能质量监测系统 本研究基于LabVIEW开发了一个创新的电能质量监测系统,专注于暂态电能质量扰动信号的产生、分析与存储。该系统不仅模拟产生了电压骤降、电压波动、暂态振荡以及电压畸变等关键信号,还能够记录并存储这些扰动信号产生时的波…

Vmware Windows10安装Apache php

文章目录 一、下载必要的软件二、安装Apache三、安装php四、php连接Apache五、测试 一、下载必要的软件 Apache:https://www.apachelounge.com/download/ PHP:http://windows.php.net/download/ 二、安装Apache 将下载的压缩包解压,移动里…

MyBatis中的N+1问题,使用ResultSet来解决,需要存储过程【非常详细】

参考 https://mybatis.org/mybatis-3/zh/sqlmap-xml.html https://mybatis.net.cn/sqlmap-xml.html#Result_Maps 基础表sql 订单表 CREATE TABLE test_order (order_id bigint(20) NOT NULL AUTO_INCREMENT COMMENT 订单id,order_name varchar(255) NOT NULL DEFAULT COMME…

KITTI数据集处理为COCO数据集格式

KITTI作为自动驾驶常用数据集,被广泛的应用于自动驾驶目标检测等过程中。 首先是数据集类别合并,原始的KITTI数据集有九个类别,分别是: Car Van Truck Pedestrian Person_sitting Cyclist Tram Misc而我们在使用过程中&#xff0…

GO并发编程综合应用

一.GO并发编程综合应用 1.生产者消费者模式 1.1需求分析 ​ 生产者每秒生产一个商品,并通过物流公司取货 ​ 物流公司将商品运输到商铺 ​ 消费者阻塞等待商铺到货,需要消费10次商品 1.2实现原理 1.3代码实现: package mainimport (&q…

SpringCloud微服务 【实用篇】| Docker启示录

目录 一:Docker启示录 1. Docker启示录 2. Docker和虚拟机的区别 3. Docker架构 4. Centos7安装Docker 4.1. 卸载 4.2. 安装docker 4.3. 启动docker 4.4. 配置镜像加速 前些天突然发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽…

Python之random模块详解

python的random模块 random模块是python中一个生成随机数的模块。 random不是python解释器内置的模块。 导入random模块的方法是: import random 如果只使用random模块中的单个方法的话,也可以使用 from random import method_name 例如: …

蓝牙协议栈学习笔记

蓝牙协议栈学习笔记 蓝牙简介 蓝牙工作在全球通用的 2.4GHz ISM(即工业、科学、医学)频段,使用 IEEE802.11 协议 蓝牙 4.0 是迄今为止第一个蓝牙综合协议规范,将三种规格集成在一起。其中最重要的变化就是 BLE(Blue…

【数学建模】《实战数学建模:例题与讲解》第十三讲-相关分析(含Matlab代码)

【数学建模】《实战数学建模:例题与讲解》第十三讲-相关分析(含Matlab代码) 基本概念典型相关分析综合评价模型对应分析因子分析聚类分析 习题10.41. 题目要求2.解题过程3.程序 习题10.51. 题目要求2.解题过程3.程序 习题10.6(1&a…

用Excel绘制柱形图

在需要将数据用柱状图表示的时候,可以用Excel进行绘制。不单绘制柱形图,其他数据图也可以用Excel绘制。 接下来用绘制一个销售表的示例演示。 1.将数据输入Excel 数学书 语文书 英语书 一月 80 94 77 二月 95 86 84 三月 130 93 79 四月 …

实用干货:再见ElementPlus,我有更好的了

大家好,我是大澈! 本文约1200字,整篇阅读大约需要3分钟。 感谢关注微信公众号:“程序员大澈”,免费领取"面试大礼包"一份,然后免费加入问答群,从此让解决问题的你不再孤单&#xff…

任务调度系统就该这么设计(万能通用),稳的一批!

今天来扒一扒轻量级的分布式任务调度平台Xxl-Job背后的架构原理 核心概念 这里还是老样子,为了保证文章的完整性和连贯性,方便那些没有使用过的小伙伴更加容易接受文章的内容,快速讲一讲Xxl-Job中的概念和使用 如果你已经使用过了&#xf…

在VS2010上使用C#调用非托管C++生成的DLL文件(图文讲解)

背景 在项目过程中,有时候你需要调用非C#编写的DLL文件,尤其在使用一些第三方通讯组件的时候,通过C#来开发应用软件时,就需要利用DllImport特性进行方法调用。本篇文章将引导你快速理解这个调用的过程。 步骤 1. 创建一个CSharp…

Java 8特性:Lambda表达式、函数式接口与Stream API的深度探索

一、引言 随着编程范式的不断演变,Java语言也在不断地发展和创新。Java 8的发布,为开发者们带来了诸多全新的特性,其中包括Lambda表达式、函数式接口以及Stream API。这些特性使得Java语言的编程更加简洁、优雅,同时也提高了代码…

mybatis多表映射-对多关联

1、建库建表 create database mybatis-example; use mybatis-example; create table t_book (bid varchar(20) primary key,bname varchar(20),stuid varchar(20) ); insert into t_book values(b001,Java,s001); insert into t_book values(b002,Python,s002); insert into …

docker部署go gin框架 Windows环境

目录 文章目的是什么 环境介绍 Windows 环境下 docker 部署 go gin 详细步骤 运行容器时因为挂载文件可能会出现的问题 直接部署gin(跳过运行容器时因为挂载文件可能会出现的问题) 文章目的是什么 假设我们学习了 go 语言,在 Windows(本…