更新debian apt-get update一直报错:
root@Bser8608377298916:~# apt-get update Ign:1 http://security.debian.org bullseye/updates InRelease Err:2 http://security.debian.org bullseye/updates Release 404 Not Found [IP: 151.101.26.132 80] Get:3 http://deb.debian.org/debian bullseye InRelease [116 kB] Get:4 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB] Get:5 http://deb.debian.org/debian bullseye-backports InRelease [49.0 kB] Get:6 http://deb.debian.org/debian bullseye/main Sources [8634 kB] Get:7 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB] Get:8 http://deb.debian.org/debian bullseye/main Translation-en [6240 kB] Get:9 http://deb.debian.org/debian bullseye-updates/main Sources [4812 B] Get:10 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.6 kB] Get:11 http://deb.debian.org/debian bullseye-updates/main Translation-en [7929 B] Get:12 http://deb.debian.org/debian bullseye-backports/main Sources [420 kB] Get:13 http://deb.debian.org/debian bullseye-backports/main amd64 Packages [416 kB] Get:14 http://deb.debian.org/debian bullseye-backports/main Translation-en [348 kB] Reading package lists... Done E: The repository 'http://security.debian.org bullseye/updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
研究应该是源的问题
先备份一下原版的sources.list文件
mv /etc/apt/sources.list /etc/apt/sources.list.old
然后替换一下官方源
cat > /etc/apt/sources.list << EOF deb http://deb.debian.org/debian/ bullseye main contrib non-free deb-src http://deb.debian.org/debian/ bullseye main contrib non-free deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free deb http://deb.debian.org/debian/ bullseye-backports main contrib non-free deb-src http://deb.debian.org/debian/ bullseye-backports main contrib non-free deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free EOF
国内可换成阿里的源
cat > /etc/apt/sources.list << EOF deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye main contrib non-free deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye-updates main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye-updates main contrib non-free deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye-backports main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye-backports main contrib non-free deb http://mirrors.cloud.aliyuncs.com/debian/ bullseye-proposed-updates main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian/ bullseye-proposed-updates main contrib non-free deb http://mirrors.cloud.aliyuncs.com/debian-security/ bullseye-security main contrib non-free deb-src http://mirrors.cloud.aliyuncs.com/debian-security/ bullseye-security main contrib non-free EOF
最后apt-get update 一下,完成修复
THE END
暂无评论内容