18

I recently try to install docker using this method

curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh

but it doesn't worked for me maybe broken packages or something after that I installed docker && docker compose using apt method and that's working good but when I try to update or upgrade my system I can see following messages I don't actually know what was the issue please give me a solution thanks.

$ sudo apt-get update

Hit:1 http://ppa.launchpad.net/daniruiz/flat-remix/ubuntu bionic InRelease
Hit:2 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease                                    
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                                  
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                       
Hit:5 http://dl.google.com/linux/chrome/deb stable Release                                         
Hit:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease                                  
Hit:7 http://lk.archive.ubuntu.com/ubuntu bionic InRelease                                         
Ign:9 https://download.docker.com/linux/debian bionic InRelease                                    
Hit:10 http://lk.archive.ubuntu.com/ubuntu bionic-updates InRelease                                
Err:11 https://download.docker.com/linux/debian bionic Release                                     
  404  Not Found [IP: 13.35.8.98 443]
Hit:13 http://lk.archive.ubuntu.com/ubuntu bionic-backports InRelease                              
Hit:12 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Reading package lists... Done                                
E: The repository 'https://download.docker.com/linux/debian bionic 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.


$ sudo apt-get upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libxml2 libxml2:i386
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

How can I remove from my source list because I don't need it anymore

mchid
  • 44,904
  • 8
  • 102
  • 162
soldier
  • 489

5 Answers5

39

According to the docker page for Ubuntu, the problem is that it should be https://download.docker.com/linux/ubuntu instead of https://download.docker.com/linux/debian.

Run the following command to fix this:

sudo sed -i 's/debian/ubuntu/g' /etc/apt/sources.list.d/docker.list
sudo apt update

However, if that doesn't fix the issue, run the following command:

sudo sed -i 's|docker.com/linux/debian|docker.com/linux/ubuntu|g' /etc/apt/sources.list
sudo apt update
mchid
  • 44,904
  • 8
  • 102
  • 162
14

I have used the following in Linux Mint:

  1. Determine the Ubuntu codename using the command below (and NOT the version codename):

    $ cat /etc/os-release | grep -i codename
    VERSION_CODENAME=una
    UBUNTU_CODENAME=focal
    
  2. Replace the Ubuntu codename in /etc/apt/sources.list.d/docker.list:

    https://download.docker.com/linux/ubuntu <CODENAME> stable
    

    In my case the command on docker website has set the codename to una (docker determines it using lsb_release -cs), but I had to change it to focal.

AP22
  • 251
0

If you are using Parrot Os, You have to Change parrtos in /etc/apt/sources.list.d/docker.list to the current debian release of your os version (bullseye, buster and so on).

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

The above command will open the docker.list file where you can change the link to now look like this:

deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bullseye stable

Just replace the bullseye with your debian codename and run sudo apt-get update again.

0

I had tried to follow the suggestions of my colleagues in the other answers here, but when I ran the apt update command, a new docker.list file was created, always with the trixie version. After studying a bit, and with the help of an LLM, I discovered that the problem is in the output of the lsb_release -cs command, which is returning Trixie, a development version of Ubuntu, or a Debian version not supported by Docker.

Docker supports some specific versions of Debian, such as bullseye and bookworm. In your case, since you are running Pistachio Linux, which seems to be configured for Debian Testing, you can force the repository to use a supported version.

It is possible to fix it manually by following these steps:

Step 1: Force the use of bullseye or bookworm version Replace the lsb_release -cs command with bullseye (or bookworm, if you are using the latest Debian Testing):

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

Step 2: Update packages and install Docker Now, try to update and install Docker packages again:

sudo apt update sudo apt install -e docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

To summarize the explanation:

The lsb_release -cs command was returning Trixie, which is not an officially supported version of Docker at the moment. By forcing the use of bullseye or bookworm (Debian versions officially supported by Docker), you will be able to install and use Docker without any problems.

0

Make sure you have

deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu   noble stable

in the /etc/apt/sources.list.d/docker.list file. I have ran into the same issue, turns out my docker.list had

deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu / noble stable

(slash before the noble stable). Got the same error as the OP posted.

zx485
  • 2,865