Trying to install docker from official documentation on ubuntu and getting this error
$ sudo apt-get install docker-ce=18.06.1~ce~3-0~ubuntu docker-ce-cli=18.06.1~ce~3-0~ubuntu containerd.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '18.06.1~ce~3-0~ubuntu' for 'docker-ce-cli' was not found
Best part is that we just installed docker on another machine yesterday and it worked then. What gives?
To my knowledge the docker-ce-cli package was introduced in Docker CE 18.09. Before that docker-ce does not have that as a dependency. You can check that by for example look into the Packages file for Ubuntu Bionic: https://download.docker.com/linux/ubuntu/dists/bionic/stable/binary-amd64/Packages
Cheers!
Only way to get rid of the error was to not install docker-ce-cli
check version