skip to Main Content

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:

Should I change to something like, without corrupting/breaking my operating system?

deb https://download.docker.com/linux/debian docker buster

3

Answers


  1. 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:

    1. open the source list (providing there isn’t external source lists):

      sudo nano /etc/apt/sources.list

    2. remove any lines for "ubuntu" as you are on Debian 10 and save

    3. run sudo apt-get update

    Login or Signup to reply.
  2. Create the following file:

    $ cat /etc/apt/sources.list.d/docker-ce.list 
    deb [arch=amd64] https://download.docker.com/linux/debian buster stable
    

    Then remove any other download.docker.com entries in /etc/apt/sources.list or /etc/apt/sources.list.d/*

    Login or Signup to reply.
  3. See Install Docker Engine on Debian. Use the following commands:

    curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
    
    echo 
    "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" |
    sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    

    The first command will download the gpg key, the second one will adjust your docker.list file.

    Then run sudo apt update

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search