Ubuntu 获取升级信息失败。可能网络有问题

升级Ubuntu系统时遇到的这个问题, 原因是默认的源不是国内的,而且还可能导致下载慢等问题。
1.备份源

cd /etc/apt/
sudo cp sources.list sources.list.bat

2.更换源

sudo vim sources.list

清除sources.list内的所有内容.更换为


#阿里云 Ubuntu 18.04

    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

按“ [Shift] +ZZ ”保存并退出
3.刷新

apt-get update
apt-get upgrade

OK 啦 !

温馨提示:
更新系统后要换新的源->hugboy源库

posted @ 2020-04-23 13:52  HUGBOY  阅读(1594)  评论(0编辑  收藏  举报