I try to update docker on Debian, with the following command:
sudo apt-get update --allow-releaseinfo-change
But I got the following error message:
Hit:1 http://asi-fs-n.contabo.net/debian buster InRelease
Hit:2 http://asi-fs-n.contabo.net/debian buster-updates InRelease
Hit:3 http://security.debian.org/debian-security buster/updates InRelease
Get:4 https://download.docker.com/linux/debian buster InRelease [54.0 kB]
Hit:5 https://download.docker.com/linux/ubuntu zesty InRelease
Ign:6 https://download.docker.com/linux/ubuntu docker InRelease
Err:7 https://download.docker.com/linux/ubuntu docker Release
404 Not Found [IP: 13.224.94.87 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu docker 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 another StackOverflow topic, it seems I must update the file /etc/apt/sources.list.d/docker.list
I tried the following (but it does not work):
deb https://get.docker.io/ubuntu docker main
Noticed that:
- I use Debian 10
- The following command print "buster" : https://download.docker.com/linux/debian
Should I change to something like, without corrupting/breaking my operating system?
deb https://download.docker.com/linux/debian docker buster
3
Answers
I had a similar issue on a VM once. The repo for "https://download.docker.com/linux/ubuntu docker" does not exist and needs to be removed. Unsure why it’s there.
This worked for me:
open the source list (providing there isn’t external source lists):
sudo nano /etc/apt/sources.list
remove any lines for "ubuntu" as you are on Debian 10 and save
run
sudo apt-get update
Create the following file:
Then remove any other
download.docker.com
entries in/etc/apt/sources.list
or/etc/apt/sources.list.d/*
See Install Docker Engine on Debian. Use the following commands:
The first command will download the gpg key, the second one will adjust your docker.list file.
Then run
sudo apt update