即使存储库有发布文件,Debian 11 (bullseye) 上也会出现“存储库没有发布文件”错误

Fra*_*raF 8 linux debian docker

我在我的树莓派 pi4 上安装了 Debian 11 (bullseye),我尝试使用存储库按照官方指南安装 Docker,但在设置存储库后我陷入了更新困境。

当我尝试更新时,我得到以下输出:

Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://archive.raspberrypi.org/debian bullseye InRelease
Ign:5 https://download.docker.com/linux/debian \ InRelease
Err:6 https://download.docker.com/linux/debian \ Release
  404  Not Found [IP: 13.226.175.74 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/debian \ 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.
Run Code Online (Sandbox Code Playgroud)

据我了解,它正在https://download.docker.com/linux/debian中搜索 Debian 的二进制文件

尽管二进制文件不存在,但我在https://download.docker.com/linux/debian/dists/bullseye/中找到了它

还有在

https://download.docker.com/linux/debian/dists/bullseye/stable/其中有一个针对一堆架构的发布文件。

我尝试更改 URL,sources.list.d/docker.list但没有成功。

我也不明白为什么当该网站明显存在时给定的 URL 会给出 404 错误。

Fra*_*raF 15

我只是个傻子...

 echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Run Code Online (Sandbox Code Playgroud)

我没有删除第二个反斜杠...

希望这可以帮助我以外的其他人