"The repository does not have a Release file" error on Debian 11 (bullseye) even though the repository has a Release file

Viewed 1498

I have Debian 11 (bullseye) installed on my raspberry pi4, I tried to install Docker following the official guide using the repository but I got stuck on the update after setting up the repository.

When I try to update, I get this as an output:

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.

From what I understand it's searching for the binary for Debian in https://download.docker.com/linux/debian

Even though the binary isn't there but I found it in https://download.docker.com/linux/debian/dists/bullseye/

And also in

https://download.docker.com/linux/debian/dists/bullseye/stable/ where there is a Release file for a bunch of architectures.

I tried changing the URL in sources.list.d/docker.list but it didn't work.

I also don't understand why the given URL gives a 404 error when the site obviously exists.

1 Answers

I'm just dumb...

 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

I didn't remove the second back slash...

Hope this helps someone else other than me

Related