I am trying to install Docker on a completely fresh installation of Debian buster. I followed the instructions at Install Docker Engine on Debian | Docker Documentation which went fine up to:
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
which produced the following output:
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 However the following packages replace it: docker-ce-cli:amd64 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'
When I use apt search, it finds all three packages despite apt install saying it cannot. I saw here How to Install Docker CE on Debian 10 | Linode that this error can be because the stable version of Docker isn’t available yet but following the instructions there (ie adding “edge test” to the end of the appropriate line in apt/sources.list.d/docker.list) made no difference whatever.
I ran # apt update before running # apt install both times with exactly the same result. I’ve been using apt for years and I cannot ever recall a situation where apt search found a package that apt install claimed had no installation candidate.
I would have thought this was a common error but I’m stuck here and an hour of fruitless Googling hasn’t helped. My Debian installation was absolutely brand new so it’s unlikely to be caused by anything else I’ve installed.
Does anyone know what I’m doing wrong?