1.输入该命令按回车键拷贝源文件进行备份:cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.输入该命令按回车键:vi /etc/apt/sources.list
3.按i进入插入模式,将文件内容修改为如下内容,然后按ESC键输入wq按回车键保存退出vi编辑
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
\# deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
\# deb-src 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-backports main restricted universe multiverse
4.输入该命令按回车键更新列表:apt-get update