当前位置:网站首页>Error "failed to fetch" XXX "temporary failure resolvingw: some index files failed to download" solution
Error "failed to fetch" XXX "temporary failure resolvingw: some index files failed to download" solution
2022-07-23 18:53:00 【wild _ wolf】
Solution 1: Restore to original Ubuntu Mirror image
If this error is encountered , The first trick is to switch back to the original image . This involves from /usr/share/doc/apt/examples/sources.list Create a new source list file from the sample source list file in the path .
View the sample source list file , As shown below :
$ cat /usr/share/doc/apt/examples/sources.list
Output is as follows :
But first of all , According to consistent suggestions , Make a backup copy of the source list , As shown below :
$ sudo mv /etc/apt/sources.list{
,.backup}
$ sudo mv /etc/apt/sources.list.d{
,.backup}
Next , Follow these steps to create a new source list file from the sample source list file :
$ sudo mkdir /etc/apt/sources.list.d
$ sudo cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list
Last , Update the repository as shown .
$ sudo apt update
This will restore all mirrors and enable Canonical Supported by “ Lord ” The repository .
To install the community support package 、 Proprietary software packages and software packages that are not available under a completely free license , Consider enabling the following repositories :
Universe – Free and open source software maintained by the community .
Restricted – Device specific drivers .
Multiverse – Software restricted by copyright or legal issues .
To enable these repositories , Please call the following command .
$ sudo add-apt-repository restricted
$ sudo add-apt-repository multiverse
$ sudo add-apt-repository universe
Then update the source table
$ sudo apt update
Solution 2: from Ubuntu Select the latest image in the official image
Consider switching to the image closest to your geographical location ( Usually happens to be the fastest mirror ). The simple way is to ensure that the image defined in the source list file contains relative to the country of residence / Countries in the region / Region code . for example /etc/apt/sources.list The official image of the United States provided in is :
deb http://us.archive.ubuntu.com/ubuntu focal main restricted
Replace it with the domestic Tsinghua source :
# The source image is annotated by default to improve apt update Speed , If necessary, please cancel the comment
deb http://mirrors.aliyun.com/ubuntu/ yammy main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ yammy-backports main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ yammy-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ yammy-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ yammy-updates main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ yammy main multiverse restricted universe
#deb-src http://mirrors.aliyun.com/ubuntu/ yammy-backports main multiverse restricted universe
#deb-src http://mirrors.aliyun.com/ubuntu/ yammy-proposed main multiverse restricted universe
#deb-src http://mirrors.aliyun.com/ubuntu/ yammy-security main multiverse restricted universe
#deb-src http://mirrors.aliyun.com/ubuntu/ yammy-updates main multiverse restricted universe
Then update the source table
$ sudo apt update
Solution 3: Copy the contents of the source list from a well functioning system
Last , Another way to solve this error is from another functional Ubuntu The system copies the contents of the source list file and pastes them into the source list file of the system . This is by far the easiest way to fix this error .
After all the above attempts, you can modify the configuration file /etc/resolv.conf,
sudo vim /etc/resolv.conf
Add domain name server 8.8.8.8,
nameserver 8.8.8.8
The above methods should help you solve Ubuntu This annoying mistake on . If it helps you , please Click like or collect Oh .
边栏推荐
- Clean code and efficient system method
- 图的存储结构与方法(二)
- How to evaluate the accuracy of stock analysts' prediction?
- LM393 low power dual voltage comparator parameters, pins, application details
- 【游戏建模模型制作技巧分享】ZBrush如何调整笔刷大小
- Jetpack Compose之Navigation组件使用
- Completion report of communication software development and Application
- The first layer of OSI model: physical layer, the cornerstone of existence!
- Interface test overview
- BOM introduction of BOM series
猜你喜欢

【2020】【论文笔记】太赫兹新型探测——太赫兹特性介绍、各种太赫兹探测器

怎么将word中的times new roman的双引号替换成宋体双引号

Paddlenlp之UIE分类模型【以情感倾向分析新闻分类为例】含智能标注方案)

1259. Disjoint handshake dynamic programming
![JUC concurrent programming [detailed explanation and demonstration]](/img/08/a680e4686a34f7b177c2650f330dfb.png)
JUC concurrent programming [detailed explanation and demonstration]

As a senior 3D modeler, I give some suggestions to novice learning partners to use

BOM introduction of BOM series

入行3D建模有前景吗?就业高薪有保障还是副业接单赚钱多

【3D建模制作技巧分享】Zbrush如何将图片转浮雕模型

Crack WiFi password with Kail
随机推荐
Spark 安装与启动
MySQL [knowing and mastering one article is enough]
quota的使用方法
世界上最大的开源基金会 Apache 是如何运作的?
PCL: multi line fitting (RANSAC)
Building virtual private network based on softther
Google is improving the skin color performance in all products and practicing the concept of "image fairness"
1259. Programmation dynamique de poignée de main disjointe
Jetty 服务器的 NIO 机制是如何导致堆外内存溢出的
[whole process of game modeling model production] 3ds Max and ZBrush produce radio receivers
PCL: ajustement multiligne (RANSAC)
Jumpserver administrator account is locked
ROS (27): the simple use of rosparam and the unsuccessful transfer of parameters through launch and its solution
代码整洁,高效的系统方法
Detailed explanation: tmp1750 chip three channel linear LED driver
识别引擎ocropy->ocropy2->OCRopus3总结
Deepstream learning notes (II): description of GStreamer and deepstream-test1
How to replace the double quotation marks of Times New Roman in word with the double quotation marks in Tahoma
Opencv (13): brief introduction to cv2.findcontours, cv:: findcontours and description of cv2.findcontours function in various versions of opencv
有人是靠自学建模找到工作的吗?千万别让这些思维害了你