skip to Main Content

My lsb_release -a output is as below

Distributor ID: Pop
Description:    Pop!_OS 22.04 LTS
Release:    22.04
Codename:   jammy

I am trying to download Docker from official webpage but all the time I am having below error.

>sudo apt-get update
Ign:1 https://download.docker.com/linux/debian jammy InRelease
Hit:2 http://apt.pop-os.org/proprietary jammy InRelease
Hit:3 http://apt.pop-os.org/release jammy InRelease
Err:4 https://download.docker.com/linux/debian jammy Release
  404  Not Found [IP: 18.67.240.19 443]
Hit:5 http://apt.pop-os.org/ubuntu jammy InRelease
Hit:6 http://apt.pop-os.org/ubuntu jammy-security InRelease
Hit:7 http://apt.pop-os.org/ubuntu jammy-updates InRelease
Hit:8 http://apt.pop-os.org/ubuntu jammy-backports InRelease
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/debian jammy 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.

/etc/apt/sources.list file has nothing in it. sources.list file as shown as below:

## See sources.list(5) for more information, especialy
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
# deb cdrom:[Pop_OS 22.04 _Jammy Jellyfish_ - Release amd64 (20221026)]/ jammy main restricted
# deb cdrom:[Pop_OS 22.04 _Jammy Jellyfish_ - Release amd64 (20221026)]/ stable main restricted
# deb cdrom:[Pop_OS 22.04 _Jammy Jellyfish_ - Release amd64 (20221026)]/ unstable main restricted

Also, I have tried to add [truested=yes] (https://download.docker.com/linux/debian) and that also didn’t work.

Can anyone help?

2

Answers


  1. Sometimes I got the same error when I try to install something (not only docker) in a new linux distro.

    What has worked for me is

    • If the error is in the x version of distro but it worked in x-1 version, I replace the new /etc/apt/sources.list.d/docker.list with the old
    • If the error is in my new cool distro, I use the /etc/apt/sources.list.d/docker.list of another linux distro (friend, coworker, etc) in which the required tool was installed without errors.
    • Sometimes it was networks issues (mine or linux public repositories). So after some hours, the same command worked

    Steps

    • Take a backup of
      • /etc/apt/sources.list
      • /etc/apt/sources.list.d/docker.list
    • Use my sources.list (ubuntu 22)

    /etc/apt/sources.list

    deb mirror://mirrors.ubuntu.com/mirrors.txt jammy main restricted universe multiverse
    deb-src mirror://mirrors.ubuntu.com/mirrors.txt jammy main restricted universe multiverse
    deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
    deb-src http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
    deb mirror://mirrors.ubuntu.com/mirrors.txt jammy-updates main restricted universe multiverse
    deb-src mirror://mirrors.ubuntu.com/mirrors.txt jammy-updates main restricted universe multiverse
    

    /etc/apt/sources.list.d/docker.list

    deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu       bionic stable
    
    • Execute sudo apt-get update

    If it don’t work, restore both files with your backup

    Login or Signup to reply.
  2. Jammy is a Ubuntu codename, so you can’t pull that from the Debian directory.

    Look in /etc/apt/sources.list.d for the docker config, and change the Debian reference to Ubuntu. That will get you to the correct download directory.

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