apt-get update mirrors Err:2

来源:互联网 发布:手机吉他软件模拟 编辑:程序博客网 时间:2024/05/20 15:59
root@wh-PC:/home/wh# apt-get update
Err:1 http://mirrors.aliyun.com/ubuntu xenial InRelease
  Temporary failure resolving 'mirrors.aliyun.com'
Err:2 http://mirrors.aliyun.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'mirrors.aliyun.com'
Err:3 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'mirrors.aliyun.com'
Err:4 http://mirrors.aliyun.com/ubuntu xenial-proposed InRelease
  Temporary failure resolving 'mirrors.aliyun.com'
Err:5 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease
  Temporary failure resolving 'mirrors.aliyun.com'

Reading package lists... Done        


1.vim /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
nameserver 192.168.23.1  
nameserver 221.130.33.52  
nameserver 169.95.1.1  

2. 你可以在服务器的终端中输入“lsb_release -a”命令或者查看“/etc/issue”文件来确定当前系统的版本。

eg: xenial----my version

3.vim /etc/apt/sources.list

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main multiverse restricted universe

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main multiverse restricted universe

4.sudo apt-get clean

sudo apt-get update
sudo apt-get upgrade


0 0
原创粉丝点击