针对国外软件源不稳定的问题,本文提供Ubuntu系统更换阿里云镜像源的操作步骤。
还原过程:备份源文件,切换到如下目录
cd /etc/apt/
$sudo cp sources.list sources.list.bk #备份
切换到如下目录: cd /etc/apt/sources.list.d/
输入以下内容 :sudo vi ubuntu.sources
Types: deb
URIs: https://mirrors.aliyun.com/ubuntu/
Suites: noble noble-security noble-updates noble-proposed noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
~
原来的 ubuntu 源前面加# 注释 ,保存退出
验证源有效性:sudo apt list --upgradable