Docker Install Ubuntu : docker-desktop : Depends: docker-ce-cli but it is not installable



Docker Install Ubuntu : docker-desktop : Depends: docker-ce-cli but it is not installable | ninjasquad

Problem

I was experiencing an issue when installing the docker desktop on Ubuntu 22.04, as it throws the below error when I ran the below command.

sudo apt install ./docker-desktop-4.17.0-amd64.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'docker-desktop' instead of './docker-desktop-4.17.0-amd64.deb'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 docker-desktop : Depends: docker-ce-cli but it is not installable
E: Unable to correct problems, you have held broken packages.

Solution

After researching on Google and came up with the solution already discussed in the docker documentation.

https://docs.docker.com/engine/install/ubuntu/#set-up-the-repository

1. Update the apt package index and install packages to allow apt to use a repository over HTTPS:

sudo apt-get update

sudo apt-get install \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

2. Add Docker’s official GPG key:

sudo mkdir -m 0755 -p /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

3. Use the following command to set up the repository:

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

4. Update the libraries

sudo apt update -y

Now you can run the installation command again.


Editorial Staff

Editorial Staff at Tutsplanet is a dedicated team to write various tutorials about subjects like Programming, Technology and Operating Systems.



Source: Internet

Leave a Comment

We are offering free coding tuts

X