当前位置:   article > 正文

ubuntu无法更新的问题,提示错误Err http://mirrors.163.com trusty Release.gpg Could not resolve ‘mirrors.163.com

ubuntu无法更新的问题,提示错误Err http://mirrors.163.com trusty Release.gpg Could not resolve ‘mirrors.163.com

一般都会推荐使用国内的镜像源,比如163或者阿里云的镜像服务器
将下列文本添加到/etc/apt/sources.list文件里

  1. cd /etc/opt/
  2. sudo gedit source.list

阿里云

  1. #阿里源
  2. deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
  3. deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
  4. deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
  5. deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
  6. deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
  7. deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
  8. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
  9. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
  10. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
  11. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

修改DNS

sudo vi /etc/resolv.conf

添加

  1. # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
  2. # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
  3. nameserver 127.0.1.1
  4. #这里用的是阿里云的DNS服务器
  5. nameserver 223.5.5.5
  6. nameserver 223.6.6.6

之后执行sudo apt-get update就正常了。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/128530
推荐阅读
相关标签
  

闽ICP备14008679号