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: http://mirrors.aliyun.com/ubuntu trusty InRelease
Could not resolve 'mirrors.aliyun.com'
Err: http://mirrors.aliyun.com/ubuntu trusty-backports InRelease
Could not resolve 'mirrors.aliyun.com'
Err: http://mirrors.aliyun.com/ubuntu trusty-proposed InRelease
Could not resolve 'mirrors.aliyun.com'
Err: http://mirrors.aliyun.com/ubuntu trusty-security InRelease
Could not resolve 'mirrors.aliyun.com'
Err: 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

保存,重启机器即可
Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.的更多相关文章
- 【Problem】xampp in ubuntu下命令行启动mysql报错: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)
xampp in ubuntu下命令行启动mysql报错: reddevil@reddevil-Lenovo:/opt/lampp$ ./bin/mysql -u root -p Enter pass ...
- 在ubuntu更新时,出现错误E: Some index files failed to download, they have been ignored, or old ones used inst
原文:https://blog.csdn.net/tian_ciomp/article/details/51339635 在ubuntu更新时,出现错误E: Some index files fail ...
- ubuntu 14.04 解决apt-get update报错
apt-get update 报如下错误: 忽略 http://cn.archive.ubuntu.com trusty-backports/multiverse Translation-zh 忽略 ...
- 执行sudo apt-get update报错
1.在官网源https://mirrors.ustc.edu.cn/repogen/下载对应版本最新的源,比如我是16.04版本的ubuntu,对应下载的是这个 2.下载sources.list完成之 ...
- 解决方法:loadrunner 场景下执行webservice脚本是---报错10492 Error: Exception was raised when calling per-process-init function in extens
在vug下执行时,脚本无异常,但是在controller下执行时报下面错误,网上查了下,解决方法千奇百怪,但无一可行. 分析了下错误,似乎是初始化进程有关.想到rts中的设置习惯时以线程方式执行. 遂 ...
- Ubuntu执行sudo apt-get update报错E: 无法获得锁 /var/lib/apt/lists/lock - open (11: 资源暂时不可用) E: 无法对目录 /var/lib/apt/lists/ 加锁
一.强制解锁,执行语句 sudo rm /var/lib/apt/lists/lock 二.终端输入 ps -aux | grep apt-get 查看一下apt-get的相关进程.然后sudo ki ...
- Linux - ubuntu下Vim安装失败,报The following packages have unmet dependencies: vim : Depends: vim-common
错误命令行 root@ubuntu:/etc/apt# apt install vim Reading package lists... Done Building dependency tree R ...
- ubuntu下安装pip install mysqlclient 报错 command "python setup.py egg_info" failed with error.....解决方案
我的环境: ubuntu 1604 版本, 在黑屏终端已经安装了django和virtualenv虚拟环境, 在创建了django的models后开始迁移的操作, 出现错误, 错误代码最后如题目 可以 ...
- ubuntu下npm全局安装包报错的解决方案
大概就是 npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ERR ...
随机推荐
- Java Grammar(二):运算符
运算符简介 计算机自打诞生以来,用作最多的就是进行计算,而计算离不开运算符,所以运算符在我们的Java语言中的地位举足轻重,我们现在就来了解一下Java给我们提供的运算符. 从运算的元素的个数来区分, ...
- C++ 重载关系操作符
#include <iostream> using namespace std; class AAA { public: AAA() //默认构造 { } AAA(int id, stri ...
- tomcat 对 vue的history默认支持 tomcat 开启步骤 1.build文件放入webapps目录 2.进入conf目录修改server.xml端口号改成8088 3.进入bin目录运行startup.bat 4.浏览器 localhost:8088/workName 访问即可
tomcat 对 vue的history默认支持 tomcat 开启步骤 1.build文件放入webapps目录 2.进入conf目录修改server.xml端口号改成8088 3.进入bin目录运 ...
- 【Weiss】【第03章】练习3.20:中缀表达式转后缀表达式
[练习3.20] a.编写一个程序将中缀表达式转换为后缀表达式,该中缀表达式含括号及四则运算. b.把幂操作符添加到你的指令系统中去. c.编写一个程序将后缀表达式转化为中缀表达式. Answer: ...
- DOTNET CORE源码分析之IOC容器结果获取内容补充
补充一下ServiceProvider的内容 可能上一篇文章DOTNET CORE源码分析之IServiceProvider.ServiceProvider.IServiceProviderEngin ...
- Python基础 | 关于“循环”那些事
目录 for 循环 list range enumerate zip while 循环 while相当于if时 while充当for和if的混合体 泛循环 列表解析 map 迭代器 生成器 循环的跳出 ...
- 面试刷题12:zero copy是怎么回事?
文件copy是java的io部分不可忽视的内容. 我是李福春,我在准备面试,今天的问题是: zero-copy是怎么回事? 操作系统的空间划分为内核态空间, 用户态空间: 内核态空间相对操作系统具备更 ...
- MySQL笔记(4)-- 索引优化
索引失效情况: 最佳左前缀法则:如果索引了多列,要遵循最左前缀法则,指的是查询从索引的最左前列开始并且不跳过索引中的列:[覆盖索引有a,b,c,条件中使用了b或bc都导致该索引失效:如果条件使用了ac ...
- AutoJS4.1.0实战教程 ---火热持续更新中
这个时代假货太多,虚假广告更是充斥着整个互联网.尤其是那个传奇的我都无语了.好几个明xing代言,问题是太假了……我好奇的是那么虚假怎么就没人管呢,XX部干嘛呢……另外互联网刷视频赚钱就是个炒作.几百 ...
- 洛谷 P5639 【CSGRound2】守序者的尊严 题解
原题链接 简要题意: 从 \(1\) 号位开始走,可以连续走过一段连续的 \(0\) ,每走一次,所有位置取反. (即 \(0 \gets 1\),\(1 \gets 0\)). 算法一 模拟暴力即可 ...