Error installing Docker

Asked by Luis M.Jacinto

Ubuntu 22.04 LTS

Following “Install Docker Engine on Ubuntu” While installing Docker .deb package this error come up:
“Docker error while installation "Unable to install docker-desktop : the following packages have unmet dependencies".
How to correct this.
Thank you

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1
Revision history for this message
Luis M.Jacinto (ljacinto) said :
#2

Yes the package is from the same place.
Install Docker Engine on Ubuntu → installation steps. → Docker Desktop for Linux. → Supported platforms → DEB package . These .deb is what I tried to install.

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Why don't you just try following https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository ?

If you cannot follow that, what is the full error message that you receive for the other installation method?

Revision history for this message
Luis M.Jacinto (ljacinto) said :
#4

In the repository way there is a error on line five and if carry on with other commands it seems
they do nothing.

luis@l-System-luisj:~$ sudo apt-get update
[sudo] password for luis:
Hit:1 http://archive.canonical.com/ubuntu jammy InRelease
Ign:2 https://download.docker.com/linux/ubuntu . InRelease
Hit:3 https://ppa.launchpadcontent.net/audio-recorder/ppa/ubuntu jammy InRelease
Hit:4 https://ppa.launchpadcontent.net/bablu-boy/nutty/ubuntu jammy InRelease
Err:5 https://download.docker.com/linux/ubuntu . Release404 Not Found [IP: 52.85.254.86 443]
Get:6 https://ppa.launchpadcontent.net/elementary-os/stable/ubuntu jammy InRelease [23.8 kB]
Hit:7 https://ppa.launchpadcontent.net/jentiger-moratai/mediatools/ubuntu jammy InRelease
Get:8 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy InRelease [23.8 kB]
Get:9 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease [23.9 kB]
Get:10 https://ppa.launchpadcontent.net/elementary-os/stable/ubuntu jammy/main i386 Packages [5,900 B]
Get:11 https://ppa.launchpadcontent.net/elementary-os/stable/ubuntu jammy/main amd64 Packages [26.8 kB]
Get:12 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main i386 Packages [28.4 kB]
Get:13 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main amd64 Packages [122 kB]
Get:14 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy/main Translation-en [37.5 kB]
Hit:15 http://ubuntu.mirror.ac.za/ubuntu jammy InRelease
Get:16 http://ubuntu.mirror.ac.za/ubuntu jammy-updates InRelease [119 kB]
0% [16 InRelease 71.9 kB/119 kB 61%] 600% [WGet:17 http://ubuntu.mirror.ac.za/ubuntu jammy-backports InRelease [109 kB]
Get:18 http://ubuntu.mirror.ac.za/ubuntu jammy-security InRelease [110 kB]
Get:19 http://ubuntu.mirror.ac.za/ubuntu jammy-updates/main i386 Packages [569 kB]
Get:20 http://ubuntu.mirror.ac.za/ubuntu jammy-updates/main amd64 Packages [1,371 kB]
Get:21 http://ubuntu.mirror.ac.za/ubuntu jammy-updates/universe amd64 Packages [1,046 kB]
Get:22 http://ubuntu.mirror.ac.za/ubuntu jammy-updates/universe i386 Packages [688 kB]
Get:23 http://ubuntu.mirror.ac.za/ubuntu jammy-security/main amd64 Packages [1,154 kB]
Get:24 http://ubuntu.mirror.ac.za/ubuntu jammy-security/main i386 Packages [402 kB]
Get:25 http://ubuntu.mirror.ac.za/ubuntu jammy-security/main Translation-en [212 kB]
Get:26 http://ubuntu.mirror.ac.za/ubuntu jammy-security/restricted amd64 Packages [1,392 kB]
Get:27 http://ubuntu.mirror.ac.za/ubuntu jammy-security/restricted Translation-en [229 kB]
Get:28 http://ubuntu.mirror.ac.za/ubuntu jammy-security/universe i386 Packages [590 kB]
Get:29 http://ubuntu.mirror.ac.za/ubuntu jammy-security/universe amd64 Packages [839 kB]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu . 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.
luis@l-System-luisj:~$

The following commands looks to me they do nothing and on the end there is sudo apt-get update
which shows there are no reference to Dock.

luis@l-System-luisj:~$ sudo apt-get update
Hit:1 https://download.docker.com/linux/ubuntu jammy InRelease
Hit:2 http://archive.canonical.com/ubuntu jammy InRelease
Hit:3 https://ppa.launchpadcontent.net/audio-recorder/ppa/ubuntu jammy InRelease
Hit:4 https://ppa.launchpadcontent.net/bablu-boy/nutty/ubuntu jammy InRelease
Hit:5 https://ppa.launchpadcontent.net/elementary-os/stable/ubuntu jammy InRelease
Hit:6 https://ppa.launchpadcontent.net/jentiger-moratai/mediatools/ubuntu jammy InRelease
Hit:7 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy InRelease
Hit:8 http://ubuntu.mirror.ac.za/ubuntu jammy InRelease
Hit:9 http://ubuntu.mirror.ac.za/ubuntu jammy-updates InRelease
Get:10 http://ubuntu.mirror.ac.za/ubuntu jammy-backports InRelease [109 kB]
Hit:11 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
Hit:12 http://ubuntu.mirror.ac.za/ubuntu jammy-security InRelease
Fetched 109 kB in 4s (30.1 kB/s)
Reading package lists... Done
luis@l-System-luisj:~$

Checking if Docker installation was successful.
luis@l-System-luisj:~$ sudo service docker start
[sudo] password for luis:
Failed to start docker.service: Unit docker.service not found.
luis@l-System-luisj:~$ sudo docker run hello-world
sudo: docker: command not found
luis@l-System-luisj:~$

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

https://download.docker.com/linux/ubuntu/dists/jammy/stable/binary-amd64/

The repo is there. Just needs the line in the sources file tweaking

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

It seems that something went wrong when adding the reference to the docker repository.

What output do you receive for the following commands:

uname -a
lsb_release -crid
grep -i docker /etc/apt/sources.list /etc/apt/sources.list.d/*.list
cat -n /etc/apt/sources.list.d/docker.list
. /etc/os-release && echo "$VERSION_CODENAME"

Revision history for this message
Luis M.Jacinto (ljacinto) said :
#7

luis@l-System-luisj:~$ uname -a
Linux l-System-luisj 6.5.0-17-generic #17~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 16 14:32:32 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
luis@l-System-luisj:~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
luis@l-System-luisj:~$ grep -i docker /etc/apt/sources.list /etc/apt/sources.list.d/*.list
/etc/apt/sources.list.d/docker.list:deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu jammy stable
luis@l-System-luisj:~$ cat -n /etc/apt/sources.list.d/docker.list
     1 deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu jammy stable
luis@l-System-luisj:~$ /etc/os-release && echo "$VERSION_CODENAME"
bash: /etc/os-release: Permission denied
luis@l-System-luisj:~$ sudo /etc/os-release && echo "$VERSION_CODENAME"
[sudo] password for luis:
sudo: /etc/os-release: command not found
luis@l-System-luisj:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

1. You missed that there is a dot at the beginning of the last command.

2. What output do you now receive for the command
sudo apt update

Revision history for this message
Luis M.Jacinto (ljacinto) said :
#9

luis@l-System-luisj:~$ . /etc/os-release && echo "$VERSION_CODENAME"
jammy
luis@l-System-luisj:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

Repeating:

What output do you now receive for the command
sudo apt update

Revision history for this message
Luis M.Jacinto (ljacinto) said :
#11

Apologize for the mistake

luis@l-System-luisj:~$ sudo apt update
[sudo] password for luis:
Hit:1 http://ubuntu.mirror.ac.za/ubuntu jammy InRelease
Hit:2 http://ubuntu.mirror.ac.za/ubuntu jammy-updates InRelease
Hit:3 https://download.docker.com/linux/ubuntu jammy InRelease
Get:4 http://ubuntu.mirror.ac.za/ubuntu jammy-backports InRelease [109 kB]
Hit:5 http://ubuntu.mirror.ac.za/ubuntu jammy-security InRelease
Hit:6 http://archive.canonical.com/ubuntu jammy InRelease
Hit:7 https://ppa.launchpadcontent.net/audio-recorder/ppa/ubuntu jammy InRelease
Hit:8 https://ppa.launchpadcontent.net/bablu-boy/nutty/ubuntu jammy InRelease
Hit:9 https://ppa.launchpadcontent.net/elementary-os/stable/ubuntu jammy InRelease
Hit:10 https://ppa.launchpadcontent.net/jentiger-moratai/mediatools/ubuntu jammy InRelease
Get:11 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy InRelease [23.8 kB]
Hit:12 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
Get:13 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main amd64 Packages [34.2 kB]
Fetched 167 kB in 3s (55.4 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
18 packages can be upgraded. Run 'apt list --upgradable' to see them.
luis@l-System-luisj:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

Now it looks correct ("Hit:3 https://download.docker.com/linux/ubuntu jammy InRelease")

What happens now, when you do the next step and try installing the docker packages:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

and then test your installation by running the hello-world image:
sudo docker run hello-world

Revision history for this message
Luis M.Jacinto (ljacinto) said :
#13

Running the hello-world I hope this is correct.

luis@l-System-luisj:~$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete
Digest: sha256:4bd78111b6914a99dbc560e6a20eab57ff6655aea4a80c50b0c5491968cbc2e6
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

luis@l-System-luisj:~$

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#14

Looks perfect. The docker software is installed and it is working.
Is there anything else that you need? If not, then please mark the question document as "solved".

Revision history for this message
Luis M.Jacinto (ljacinto) said :
#15

Thanks Manfred Hampl, that solved my question.