1 、打开终端,输入下面命令进行备份:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2 、编辑sources.list文件
在终端执行下面命令,打开sources.list文件进行编辑
sudo gedit /etc/apt/sources.list
打开文件后,删除原来的文件内容,复制下面内容到sources.list里并保存
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src