Cannot install docker-desktop on ubuntu 22.04

5,914

Solution 1

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 https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
  5. echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(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

Solution 2

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.

Solution 3

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.

Share:
5,914
Author by

RikuPotato

Updated on January 04, 2023

Comments

  • RikuPotato 3 minutes

    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

  • Admin
    Admin 7 months
    I followed these exact instructions using sudo apt-get and I get the same error as OP
  • Admin
    Admin 7 months
    Thanks, these steps worked well. There were other good answers, but incomplete.
  • Admin
    Admin 6 months
    This is a commentary to another answer. It will be removed by moderators. But you can write your own full answer.
  • Admin
    Admin 6 months
    I can concur that these steps worked, though after step 6, you can just proceed to step 8, using apt install to point to the .deb file. And if it's not clear to readers, note that those first 5 steps Nafiu offered are indeed from the Docker docs, and the Docker Desktop docs point to this need to update the repository (docs.docker.com/desktop/linux/install/debian/…), pointing to the page Nafiu had. Beware that you must do that step 6 before proceeding to step 8.