1.更新原有镜像源:

root@caoyi-virtual-machine:/etc/apt# apt update
root@caoyi-virtual-machine:/etc/apt# apt upgrade
root@caoyi-virtual-machine:/etc/apt# apt install ca-certificates      ##更新ca

2.备份原有镜像源:

cp /etc/apt/sources.list /etc/apt/sources.list.bak

3.添加清华源:

echo deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse > /etc/apt/sources.list

4.更新新增源后的apt

apt update
apt upgrade
apt install vim      ##测试是否可以下载软件