unbuntu 17.10版本更换阿里源和dns服务器地址

xiaoxiao2021-02-28  51

    今天使用sudo apt-get update命令时出现fetch failed xxxx错误,百度得知是由于dns服务器地址和阿里源地址需要更换(百度一大堆,没有几个可以用的)。

    下面提供一下本人刚刚解决的问题的方法。

    dns服务器地址,修改/etc/resolv.conf文件内容:

nameserver 119.29.29.29 nameserver 114.114.114.114 nameserver 180.76.76.76 nameserver 1.2.4.8 nameserver 127.0.0.53

    阿里云源地址,修改/etc/apt/sources.list文件内容:

deb http://mirrors.aliyun.com/ubuntu/ artful main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ artful-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ artful-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ artful-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ artful main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ artful-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ artful-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ artful-backports main restricted universe multiverse    如此即可运行sudo apt-get update进行更新
转载请注明原文地址: https://www.6miu.com/read-2622681.html

最新回复(0)