先备份官方源
cp /etc/apt/sources.list /etc/apt/sources.list.bak
然后创建新的apt源文件
echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse" > /etc/apt/sources.list
之后依次执行以下命令即可安装vim,后续再用vim将apt源文件补充完整即可
apt update
apt upgrade
apt install vim