×

debian更换源

Legend Legend 发表于2023-01-31 18:23:49 浏览399 评论0

抢沙发发表评论

进入软件包源地址文件:


sudo vim /etc/apt/sources.list

删除sources.list中所有内容,输入以下更新源地址(全部复制粘贴写入sources.list文件,任选一个即可):


阿里云(推荐):


deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib

deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib

deb https://mirrors.aliyun.com/debian-security/ bullseye-security main

deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main

deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib

deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib

deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib

deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib

中科大:


deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free

deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free

deb https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free

deb https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free

清华镜像站:


deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

华为:


deb https://mirrors.huaweicloud.com/debian/ bullseye main non-free contrib

deb-src https://mirrors.huaweicloud.com/debian/ bullseye main non-free contrib

deb https://mirrors.huaweicloud.com/debian-security/ bullseye-security main

deb-src https://mirrors.huaweicloud.com/debian-security/ bullseye-security main

deb https://mirrors.huaweicloud.com/debian/ bullseye-updates main non-free contrib

deb-src https://mirrors.huaweicloud.com/debian/ bullseye-updates main non-free contrib

deb https://mirrors.huaweicloud.com/debian/ bullseye-backports main non-free contrib

deb-src https://mirrors.huaweicloud.com/debian/ bullseye-backports main non-free contrib

网易:


deb https://mirrors.163.com/debian/ bullseye main non-free contrib

deb-src https://mirrors.163.com/debian/ bullseye main non-free contrib

deb https://mirrors.163.com/debian-security/ bullseye-security main

deb-src https://mirrors.163.com/debian-security/ bullseye-security main

deb https://mirrors.163.com/debian/ bullseye-updates main non-free contrib

deb-src https://mirrors.163.com/debian/ bullseye-updates main non-free contrib

deb https://mirrors.163.com/debian/ bullseye-backports main non-free contrib

deb-src https://mirrors.163.com/debian/ bullseye-backports main non-free contrib

腾讯云:


deb https://mirrors.tencent.com/debian/ bullseye main non-free contrib

deb-src https://mirrors.tencent.com/debian/ bullseye main non-free contrib

deb https://mirrors.tencent.com/debian-security/ bullseye-security main

deb-src https://mirrors.tencent.com/debian-security/ bullseye-security main

deb https://mirrors.tencent.com/debian/ bullseye-updates main non-free contrib

deb-src https://mirrors.tencent.com/debian/ bullseye-updates main non-free contrib

deb https://mirrors.tencent.com/debian/ bullseye-backports main non-free contrib

deb-src https://mirrors.tencent.com/debian/ bullseye-backports main non-free contrib

进入Debian后输入apt-get update后报错显示没有Release文件:


执行以下命令:


cd /etc/apt/sources.list.d

rm AdoptOpenJDK.list mobian.list

cd

再次执行更新命令就不会报错了。