报错命令

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.的更多相关文章

  1. 【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 ...

  2. 在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 ...

  3. ubuntu 14.04 解决apt-get update报错

    apt-get update 报如下错误: 忽略 http://cn.archive.ubuntu.com trusty-backports/multiverse Translation-zh 忽略 ...

  4. 执行sudo apt-get update报错

    1.在官网源https://mirrors.ustc.edu.cn/repogen/下载对应版本最新的源,比如我是16.04版本的ubuntu,对应下载的是这个 2.下载sources.list完成之 ...

  5. 解决方法:loadrunner 场景下执行webservice脚本是---报错10492 Error: Exception was raised when calling per-process-init function in extens

    在vug下执行时,脚本无异常,但是在controller下执行时报下面错误,网上查了下,解决方法千奇百怪,但无一可行. 分析了下错误,似乎是初始化进程有关.想到rts中的设置习惯时以线程方式执行. 遂 ...

  6. 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 ...

  7. 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 ...

  8. ubuntu下安装pip install mysqlclient 报错 command "python setup.py egg_info" failed with error.....解决方案

    我的环境: ubuntu 1604 版本, 在黑屏终端已经安装了django和virtualenv虚拟环境, 在创建了django的models后开始迁移的操作, 出现错误, 错误代码最后如题目 可以 ...

  9. ubuntu下npm全局安装包报错的解决方案

    大概就是 npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ERR ...

随机推荐

  1. python学习-练习题9*9乘法表巩固

    9*9乘法表 分析: 1X1为一行 1X2 2X2 为一行 for i in range(1,10): for j in range(1,i+1): print(str(i) + 'X' + str( ...

  2. PHP数组的升序降序函数

    数组排序函数:::sort()对数组进行升序排列rsort()对数组进行降序排列 asort()根据关联数组的值,对数组进行升序排列ksort()根据关联数组的键,对数组进行升序排列 arsort() ...

  3. ubuntu 安装flask+nginx+gunicorn 待定

    第一步 先检查服务器环境   pip python3 mysql redis 能下就下,该升级就升级 第二步 如果你的flask程序在github上 请使用git clone 地址 下载下来(如果是私 ...

  4. 区间DP(力扣1000.合并石头的最低成本)

    一.区间DP 顾名思义区间DP就是在区间上进行动态规划,先求出一段区间上的最优解,在合并成整个大区间的最优解,方法主要有记忆化搜素和递归的形式. 顺便提一下动态规划的成立条件是满足最优子结构和无后效性 ...

  5. Flask 请求中间件、错误处理、标签、过滤器、CBV

    目录 一.请求中间件 二.请求中间件额外方法(重写源码) 三.请求错误处理 四.请求标签.过滤器 五.CBV写法 基础版 常用版 一.请求中间件 中间件: 1 before_first_request ...

  6. C/C++、C#、JAVA(一):代码模板与库代码的引入

    代码默认模板 编译性高级编程语言中,几乎每种语言,都有个静态的 main 方法作为程序启动入口,每种语言都有其编写规范.为了学习 C/C++.C#.JAVA四种语言,我们要先从默认代码模板中,慢慢摸索 ...

  7. MyBatis框架——延迟加载

    延迟加载也叫惰性加载或者懒加载,使⽤延迟是为了提⾼程序的运⾏效率,具体是通过尽量少执⾏ SQL 语句来提升效率.Java 程序与数据库的交互频率越低越好,MyBatis 提供的延迟加载功能就可以做到这 ...

  8. 从零开始学习R语言(一)——数据结构之“向量”(Vector)

    本文首发于知乎专栏:https://zhuanlan.zhihu.com/p/59688569 也同步更新于我的个人博客:https://www.cnblogs.com/nickwu/p/125370 ...

  9. Springboot使用Undertow

    Springboot使用Undertow Undertow 是红帽公司开发的一款基于 NIO 的高性能 Web 嵌入式服务器 Undertow的特点: 轻量级:它是一个 Web 服务器,但不像传统的 ...

  10. 曹工说Spring Boot源码(25)-- Spring注解扫描的瑞士军刀,ASM + Java Instrumentation,顺便提提Jar包破解

    写在前面的话 相关背景及资源: 曹工说Spring Boot源码(1)-- Bean Definition到底是什么,附spring思维导图分享 曹工说Spring Boot源码(2)-- Bean ...