Cannot install docker-desktop on ubuntu 22.04

I am trying to install docker-desktop from here

I downloaded the .deb package

with

sudo dpkg -i docker-desktop-4.8.1-amd64.deb

but I got a couple of missing dependicies problems

(Reading database ... 422535 files and directories currently installed.)
Preparing to unpack docker-desktop-4.8.1-amd64.deb ...
Unpacking docker-desktop (4.8.1-78998) over (4.8.1-78998) ...
dpkg: dependency problems prevent configuration of docker-desktop: docker-desktop depends on docker-ce-cli; however: Package docker-ce-cli is not installed. docker-desktop depends on pass; however: Package pass is not installed.
dpkg: error processing package docker-desktop (--install): dependency problems - leaving unconfigured
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Errors were encountered while processing: docker-desktop

I Have tried to install the missing dependicies using

sudo apt-get -f install

But it still returns the same error message as above

0

4 Answers

You can fix this by running the following commands:

  1. sudo apt-get update
  2. sudo apt-get install ca-certificates curl gnupg lsb-release
  3. sudo mkdir -p /etc/apt/keyrings
  4. curl -fsSL | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  5. echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  6. sudo apt update
  7. sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
  8. Then run sudo apt-get install ./docker-desktop-<version>-<arch>.deb

More info here: Install Docker Engine on Ubuntu

You're not following the instructions, and thus are getting errors.

If you were following the instructions, you would use this command to install: sudo apt-get install ./docker-desktop-<version>-<arch>.deb, and your dependencies would be resolved during installation for you.

dpkg is a low-level tool, that does not automatically resolve dependencies. apt-get (and apt) are higher-level tools that use dpkg, but also resolve dependencies for you.

1

I had the same problem
I fixed it by iinstalling a docker engine
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin

then sudo apt-get install ./docker-desktop-<version>-<arch>.deb

0

I tried some of the above solutions but they did not work for me. Hence what I did, I went to the site and first installed the Docker Engine and then installed the Docker Desktop and it worked

Kindly follow these instructions as indicated on the website to download the Docker engine and then go ahead and download the Docker Desktop

That's what worked for me.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like