Issues Installing Docker Desktop: Conflicts with Existing Packages

I’m encountering issues while attempting to install Docker Desktop. The installation fails due to conflicts with existing packages, specifically docker-cli and podman-docker. Below is a detailed description of the problem and the steps I’ve taken.

System Information:

  • Operating System: Fedora 41
  • Current Docker Version: 27.3.1

Initial Installation Attempt:

sudo dnf install ./docker-desktop-x86_64.rpm

Error Messages:

Failed to resolve the transaction:
Problem: problem with installed package
  - installed package docker-cli-27.3.1-2.fc41.x86_64 conflicts with docker-ce-cli provided by docker-ce-cli-1:27.2.1-1.fc41.x86_64 from docker-ce-stable
  - package docker-cli-27.3.1-2.fc41.x86_64 from fedora conflicts with docker-ce-cli provided by docker-ce-cli-1:27.2.1-1.fc41.x86_64 from docker-ce-stable
  - package docker-desktop-4.36.0-175267.x86_64 from @commandline requires docker-ce-cli, but none of the providers can be installed
  - installed package docker-cli-27.3.1-2.fc41.x86_64 conflicts with docker-ce-cli provided by docker-ce-cli-1:27.3.0-1.fc41.x86_64 from docker-ce-stable
  - package docker-cli-27.3.1-2.fc41.x86_64 from fedora conflicts with docker-ce-cli provided by docker-ce-cli-1:27.3.0-1.fc41.x86_64 from docker-ce-stable
  - installed package docker-cli-27.3.1-2.fc41.x86_64 conflicts with docker-ce-cli provided by docker-ce-cli-1:27.3.1-1.fc41.x86_64 from docker-ce-stable
  - package docker-cli-27.3.1-2.fc41.x86_64 from fedora conflicts with docker-ce-cli provided by docker-ce-cli-1:27.3.1-1.fc41.x86_64 from docker-ce-stable
  - installed package docker-cli-27.3.1-2.fc41.x86_64 conflicts with docker-ce-cli provided by docker-ce-cli-1:27.4.0-1.fc41.x86_64 from docker-ce-stable
  - package docker-cli-27.3.1-2.fc41.x86_64 from fedora conflicts with docker-ce-cli provided by docker-ce-cli-1:27.4.0-1.fc41.x86_64 from docker-ce-stable
  - installed package docker-cli-27.3.1-2.fc41.x86_64 conflicts with docker-ce-cli provided by docker-ce-cli-1:27.4.1-1.fc41.x86_64 from docker-ce-stable
  - package docker-cli-27.3.1-2.fc41.x86_64 from fedora conflicts with docker-ce-cli provided by docker-ce-cli-1:27.4.1-1.fc41.x86_64 from docker-ce-stable
  - installed package docker-cli-27.3.1-2.fc41.x86_64 conflicts with docker-ce-cli provided by docker-ce-cli-1:27.5.0-1.fc41.x86_64 from docker-ce-stable
  - package docker-cli-27.3.1-2.fc41.x86_64 from fedora conflicts with docker-ce-cli provided by docker-ce-cli-1:27.5.0-1.fc41.x86_64 from docker-ce-stable
  - installed package docker-cli-27.3.1-2.fc41.x86_64 conflicts with docker-ce-cli provided by docker-ce-cli-1:27.5.1-1.fc41.x86_64 from docker-ce-stable
  - package docker-cli-27.3.1-2.fc41.x86_64 from fedora conflicts with docker-ce-cli provided by docker-ce-cli-1:27.5.1-1.fc41.x86_64 from docker-ce-stable

Using --allowerasing:

sudo dnf install ./docker-desktop-x86_64.rpm --allowerasing

Error:

Warning: skipped OpenPGP checks for 1 package from repository: @commandline
  - file /usr/bin/docker conflicts between attempted installs of podman-docker-5:5.3.2-1.fc41.noarch and docker-ce-cli-1:27.5.1-1.fc41.x86_64
  - conflicting requests

Steps Taken:

  1. Attempted to Remove podman-docker:
    sudo dnf remove podman-docker
    
    Output:
    No packages to remove for argument: podman-docker
    Nothing to do.
    
  2. Checked Installed Docker Packages:
    docker-cli-27.3.1-2.fc41.x86_64
    docker-compose-switch-1.0.5-1.fc41.x86_64
    docker-buildx-0.18.0-1.fc41.x86_64
    docker-compose-2.30.3-1.fc41.x86_64
    

Request for Assistance:

I seek guidance on resolving these package conflicts to successfully install Docker Desktop. Any insights or suggestions would be greatly appreciated.

Hi and welcome to :fedora: !

The conflicting package docker-cli (installed from the Fedora repos) seem to be on a higher version than the one required by docker-desktop (and consequently the ones available in the external docker-ce-stable repo).

You would need to add the conflicting packages to the fedora and updates repos (located in /etc/yum.repos.d/) as exclude packages (with exclude=docker-cli, or exclude=docker-*, assuming all such packages are available in the external repo).

You might need to run sudo dnf distro-sync --refresh before attempting to reinstall docker-desktop.

1 Like

Thank you for your assistance in resolving the Docker installation issues. Following your advice, I added the conflicting packages to the exclude list in the Fedora and updates repositories and ran sudo dnf distro-sync --refresh. Despite these steps, some of the conflicts were resolved but more additional conflicts arose.

Ultimately, I had to uninstall all Docker-related packages and successfully installed Docker and Docker Desktop again.

Your guidance was invaluable, and I appreciate your support.
Thank you @tqcharm

1 Like