Debian12 修改源为阿里

Lear 2025-10-05 10:00:00
Categories: > > Tags:

Debian12 修改源为阿里

将/etc/apt/sources.list 写入:

1
2
3
4
5
6
7
8
deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib

# 执行

1
apt update

# 如果出现证书报错,重新生成证书
1
2
apt update --allow-unauthenticated
apt install --reinstall ca-certificates -y

# 再次更新
1
apt update