一般情况下,将 /etc/apt/sources.list 文件中 Debian 默认的源地址 http://deb.debian.org/ 替换为镜像地址即可。
Debian Buster 以上版本默认支持 HTTPS 源。如果遇到无法拉取 HTTPS 源的情况,请先使用 HTTP 源并安装:
sudo apt install apt-transport-https ca-certificates
nano编辑文件执行命令:
sudo nano /etc/apt/sources.list
ctrl+k删除默认更新源,更换国内软件仓库更新源用户,输入命令进入替换更新源和执行更新:
sudo apt update sudo apt upgrade
一、联合大学更新源(二选一)
启用源码镜像 否 使用官方安全更新软件源 否
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.cernet.edu.cn/debian/ bookworm main contrib non-free non-free-firmware # deb-src https://mirrors.cernet.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.cernet.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware # deb-src https://mirrors.cernet.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.cernet.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware # deb-src https://mirrors.cernet.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb https://mirrors.cernet.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware # deb-src https://mirrors.cernet.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware # deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware # # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
软件仓库镜像地址:https://help.mirrors.cernet.edu.cn/debian/
二、南京大学更新源(二选一)
启用源码镜像 否 使用官方安全更新软件源 否
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirror.nju.edu.cn/debian/ bookworm main contrib non-free non-free-firmware # deb-src https://mirror.nju.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirror.nju.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware # deb-src https://mirror.nju.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirror.nju.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware # deb-src https://mirror.nju.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb https://mirror.nju.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware # deb-src https://mirror.nju.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware # deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware # # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
软件仓库镜像地址:https://mirror.nju.edu.cn/mirrorz-help/debian/?mirror=NJU
原创文章,作者:开心电脑网,如若转载,请注明出处。