步骤 1: 备份当前源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
步骤 2: 编辑源列表文件
sudo nano /etc/apt/sources.list
步骤 3: 添加阿里云镜像源
ubuntu 阿里源地址可以在这查看
ubuntu镜像_ubuntu下载地址_ubuntu安装教程-阿里巴巴开源镜像站
打开页面下拉找到 ubuntu 22.04 LTS 版本源地址
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
步骤 4: 更新软件包列表
sudo apt update
sudo apt upgrade