Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.

简介: Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.

报错命令


root@ubuntu:/etc/apt# apt-get update
Err:1 http://mirrors.aliyun.com/ubuntu trusty InRelease
  Could not resolve 'mirrors.aliyun.com'
Err:2 http://mirrors.aliyun.com/ubuntu trusty-backports InRelease
  Could not resolve 'mirrors.aliyun.com'
Err:3 http://mirrors.aliyun.com/ubuntu trusty-proposed InRelease
  Could not resolve 'mirrors.aliyun.com'
Err:4 http://mirrors.aliyun.com/ubuntu trusty-security InRelease
  Could not resolve 'mirrors.aliyun.com'
Err:5 http://mirrors.aliyun.com/ubuntu trusty-updates InRelease
  Could not resolve 'mirrors.aliyun.com'
Reading package lists... Done
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty/InRelease  Could not resolve 'mirrors.aliyun.com'
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty-backports/InRelease  Could not resolve 'mirrors.aliyun.com'
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty-proposed/InRelease  Could not resolve 'mirrors.aliyun.com'
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty-security/InRelease  Could not resolve 'mirrors.aliyun.com'
W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty-updates/InRelease  Could not resolve 'mirrors.aliyun.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.


报错原因


解析域名不对

 

解决方案


vim /etc/systemd/resolved.conf

dns改成8.8.8.8

image.png


保存,重启机器即可

相关文章
|
Ubuntu Linux UED
Ubuntu和Debian系统与Hat Linux系列的使用比较
所以,如果你想搞一个家用服务器,或者是个人使用,喜欢新鲜事物,那Ubuntu可能是你的最好选择。如果你需要一个在商业环境中经受住考验的系统,那Fedora或CentOS可能更符合你的口味。不过记住,CentOS现在是CentOS Stream,中途换马了,所以如果你是稳定性的极端追求者,可能得考虑一下这一变化。而Debian,则适合那些对稳定性需求极高,不太追求软件版本新旧的用户。
469 26
|
Ubuntu 搜索推荐 Linux
Ubuntu/Debian Hat系Linux的便捷操作指南
总的来说,虽然Ubuntu/Debian和Red Hat系列在操作方法上有所不同,但基本概念类似。掌握了包管理和服务管理,可以应对大多数常见的系统管理任务。同时,这两个系统都有丰富的在线资源可以查询,不管你在任务中遇到什么困难,搜索引擎都能帮你找到答案。这些基本技能能让你在Linux的世界里更加自如。
373 26
|
Ubuntu 搜索推荐 Linux
详解Ubuntu的strings与grep命令:Linux开发的实用工具。
这就是Ubuntu中的strings和grep命令,透明且强大。我希望你喜欢这个神奇的世界,并能在你的Linux开发旅程上,通过它们找到你的方向。记住,你的电脑是你的舞台,在上面你可以做任何你想做的事,只要你敢于尝试。
592 32
|
Ubuntu 安全 Linux
Linux错误排查:解决Ubuntu 20.4执行sudo apt-get update时出现的libnettle.so.6错误。
很有可能在你得到解决方案时,你也学到了不少Linux修复技巧。祝你处理计算机问题时顺利如麻!永远记得,各种问题总是像老鼠一样从意想不到的地方冒出来。但记住,不管它们跑到哪里,最终都逃不过你的捕鼠器。盖起你的计算机,拾起你的代码,大步向前!
496 28
|
Ubuntu Linux 编译器
在Ubuntu Linux系统下如何搭建并安装EDK2
以上就是在Ubuntu Linux系统下搭建并安装EDK2的过程。这个过程可能会有些复杂,但只要按照步骤一步步来,应该不会有太大问题。如果在过程中遇到任何问题,都可以在网上找到相应的解决方案。希望这个指南能对你有所帮助!
849 17
|
Ubuntu 安全 Linux
Linux错误排查:解决Ubuntu 20.4执行sudo apt-get update时出现的libnettle.so.6错误。
很有可能在你得到解决方案时,你也学到了不少Linux修复技巧。祝你处理计算机问题时顺利如麻!永远记得,各种问题总是像老鼠一样从意想不到的地方冒出来。但记住,不管它们跑到哪里,最终都逃不过你的捕鼠器。盖起你的计算机,拾起你的代码,大步向前!
494 18
|
Ubuntu Linux
Ubuntu Linux
背景 Ubuntu起源于南非,其名称“Ubuntu”来源于非洲南部祖鲁语或豪萨语,意为“人性”、“我的存在是因为大家的存在”,这体现了非洲传统的一种价值观。Ubuntu由南非计算机科学家马克·沙特尔沃斯(Mark Shuttleworth)创办,他创立了Canonical公司来推动Ubuntu的发展。Ubuntu的第一个版本于2004年发布,至今已经走过了近20个年头,成为了Linux发行版中的佼佼者。
683 4
Ubuntu Linux
|
Ubuntu Linux 开发者
Ubuntu20.04搭建嵌入式linux网络加载内核、设备树和根文件系统
使用上述U-Boot命令配置并启动嵌入式设备。如果配置正确,设备将通过TFTP加载内核和设备树,并通过NFS挂载根文件系统。
951 15
|
存储 缓存 Ubuntu
Ubuntu Linux目录结构
理解Ubuntu Linux的目录结构对系统管理、维护和故障排除至关重要。每个目录都有其特定的用途和存放内容,通过了解这些目录,可以更高效地管理系统文件,确保系统的稳定运行。希望本文对你深入理解Ubuntu的目录结构有所帮助。
1126 1
|
并行计算 Ubuntu Linux
Ubuntu学习笔记(三):Linux下操作指令大全
Ubuntu学习笔记,介绍了Linux操作系统中常用的命令和操作,如文件管理、系统信息查看、软件安装等。
536 3