zoukankan      html  css  js  c++  java
  • Linux

    报错命令

    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

     

    保存,重启机器即可

  • 相关阅读:
    MYSQL中排序
    编写一个 SQL 查询,获取 Employee 表中第二高的薪水(Salary)
    job1
    python中对于数组的操作
    python中将字符串转为字典类型
    python中的周几
    python 链接redis 获取对应的值
    jenkins 设置定时任务规则
    如何安全close go 的channel
    [转]
  • 原文地址:https://www.cnblogs.com/poloyy/p/12683821.html
Copyright © 2011-2022 走看看