赞
踩
一般都会推荐使用国内的镜像源,比如163或者阿里云的镜像服务器
将下列文本添加到/etc/apt/sources.list文件里
- cd /etc/opt/
- sudo gedit source.list
- #阿里源
- deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
- deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
修改DNS
sudo vi /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
- #这里用的是阿里云的DNS服务器
- nameserver 223.5.5.5
- nameserver 223.6.6.6
之后执行sudo apt-get update就正常了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。