I'm using Hera and would like to install Docker. I followed the install instructions


starting at Install using the repository. I'm getting stuck at point two of INSTALL DOCKER ENGINE - COMMUNITY. When running

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

I get the following error message

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'docker-ce' has no installation candidate
E: Unable to locate package docker-ce-cli
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'

Maybe the problem is related to this one here


If you would like to see my installation process for reproduction:


  1. How can I solve the problem and get the docker community edition?
  2. I installed some dependencies and maybe I will get problems if I install other dependencies now. It would be awesome if you would provide a cleanup if your solution requires different installations :)

2 Answers 2


The instructions point to adding their repository:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \

In elementary OS, lsb_release -cs will output hera, for which that repository does not contain anything.

enter image description here

But, as elementary OS is based on Ubuntu 18.04 Bionic, you can easily replace hera with bionic, like this:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

So, if you follow the instructions on their site, you'll end up with an incorrect repository in the /etc/apt/sources.list file:

deb [arch=amd64] https://download.docker.com/linux/ubuntu hera stable

To fix this, edit the file and replace hera with bionic.

Run a sudo apt update and make sure it outputs no errors.
Now, sudo apt install docker-ce docker-ce-cli containerd.io runs as expected:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  aufs-tools cgroupfs-mount pigz
The following NEW packages will be installed:
  aufs-tools cgroupfs-mount containerd.io docker-ce docker-ce-cli pigz
0 upgraded, 6 newly installed, 0 to remove and 17 not upgraded.
Need to get 85,5 MB of archives.
After this operation, 384 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

After the installation completes, running docker -v: Docker version 19.03.5, build 633a0ea838

They do state this in the instructions: enter image description here

  • 1
    Thank you very much for your detailed description
    – Question3r
    Commented Jan 13, 2020 at 21:43
  • I have Linux Mint 19.3, When I run the command sudo add-apt-repository ... I get this error: Malformed input, repository not added.
    – Oussama He
    Commented Jun 4, 2020 at 18:09

Have you tried installing it with a downloaded .deb installer? It seems that the cli file is sometimes inaccessible due to lack of support for a particular OS.

Or have you tried using: sudo apt install docker.io

  • sorry no, I didn't try. Do I have to rollback the installation before trying?
    – Question3r
    Commented Jan 12, 2020 at 14:19
  • I installed with apt directly before but it is v18 instead of the 19 I would get with their repo
    – corlaez
    Commented Jan 23, 2020 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.