1.PUTTY登录ssh,输入su root 输入root密码,或者root权限

2.备份原来的源

cp /etc/apt/sources.list /etc/apt/sources.list.bak

3.编辑写入新源URL信息

vi /etc/apt/sources.list

4.清空信息源,写入新源信息

deb https://mirrors.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.tencent.com/debian-security/ bookworm-security main
deb-src https://mirrors.tencent.com/debian-security/ bookworm-security main
deb https://mirrors.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib

5.敲击i键进入插入模式,复制内容粘贴至源文件中(PUTTY无法粘贴的话,按Shift加右键粘贴,或者Ctrl加右键弹出菜单,选择Paste)
6. 保存退出后,更改完 sources.list 文件后请运行 sudo apt-get update 更新索引以生效。