【Linux 配置】E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
2022/7/10 5:20:21
本文主要是介绍【Linux 配置】E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
问题描述
E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/universe/x/x264/libx264-155_0.155.2917+git0a84d98-2_amd64.deb Connection failed [IP: 91.189.91.39 80] E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/universe/x/x265/libx265-179_3.2.1-1build1_amd64.deb Connection failed [IP: 91.189.91.39 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? sudo apt-get update --fix-missing Err:1 http://cn.archive.ubuntu.com/ubuntu focal InRelease Connection failed [IP: 91.189.91.39 80] Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease Connection failed [IP: 91.189.91.38 80] Hit:3 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu focal InRelease Err:4 http://cn.archive.ubuntu.com/ubuntu focal-updates InRelease Connection failed [IP: 91.189.91.38 80] Err:5 http://cn.archive.ubuntu.com/ubuntu focal-backports InRelease Connection failed [IP: 91.189.91.39 80] Reading package lists... Done W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/focal/InRelease Connection failed [IP: 91.189.91.39 80] W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Connection failed [IP: 91.189.91.38 80] W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Connection failed [IP: 91.189.91.39 80] W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Connection failed [IP: 91.189.91.38 80] W: Some index files failed to download. They have been ignored, or old ones used instead.
问题解决
1,修改 DNS 地址
# 修改DNS地址 sudo echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null # 可换的DNS有: # 114公共DNS: 114.114.114.114和114.114.115.115 # 阿里的DNS: 223.5.5.5和223.6.6.6、 # 腾讯的DNS: 119.29.29.29和182.254.116.116 # 百度的DNS: 180.76.76.76 # Google的DNS: 8.8.8.8和8.8.4.4 # 测试是否修改成功: cat /etc/resolv.conf # 重新更新 sudo apt-get update --fix-missing
2,添加镜像
# 保险起见可以备份一下这个需要更改的文件 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak sudo vim /etc/apt/sources.list 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 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable # deb-src [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable # deb-src [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe # deb-src [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
这篇关于【Linux 配置】E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-12如何创建可引导的 ESXi USB 安装介质 (macOS, Linux, Windows)
- 2024-11-08linux的 vi编辑器中搜索关键字有哪些常用的命令和技巧?-icode9专业技术文章分享
- 2024-11-08在 Linux 的 vi 或 vim 编辑器中什么命令可以直接跳到文件的结尾?-icode9专业技术文章分享
- 2024-10-22原生鸿蒙操作系统HarmonyOS NEXT(HarmonyOS 5)正式发布
- 2024-10-18操作系统入门教程:新手必看的基本操作指南
- 2024-10-18初学者必看:操作系统入门全攻略
- 2024-10-17操作系统入门教程:轻松掌握操作系统基础知识
- 2024-09-11Linux部署Scrapy学习:入门级指南
- 2024-09-11Linux部署Scrapy:入门级指南
- 2024-08-21【Linux】分区向左扩容的方法