Docker Community Forums

Share and learn in the Docker community.

Can't install Docker CE

Hi,
I’m trying to install latest version of Docker CE for Ubuntu 16.04 LTS. I managed to install CE-CLI and Containerd.io. But always comes up with this error after typing “sudo apt-get install docker-ce docker-ce-cli containerd.io”:

Reading package lists… Done
Building dependency tree
Reading state information… Done
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:
fontconfig : Depends: fontconfig-config but it is not going to be installed
libfontconfig1 : Depends: fontconfig-config (= 2.11.94-0ubuntu1.1) but it is not going to be installed
libfontconfig1:amd64 : Depends: fontconfig-config:amd64 (= 2.11.94-0ubuntu1.1)
libgtk2.0-0 : Depends: libcairo2 (>= 1.6.4-6.1) but it is not going to be installed
Depends: libpangocairo-1.0-0 (>= 1.28.3) but it is not going to be installed
Depends: libpangoft2-1.0-0 (>= 1.28.3) but it is not going to be installed
Recommends: libgtk2.0-bin
libgtk2.0-0:amd64 : Depends: libcairo2:amd64 (>= 1.6.4-6.1) but it is not going to be installed
Depends: libpangocairo-1.0-0:amd64 (>= 1.28.3) but it is not going to be installed
Depends: libpangoft2-1.0-0:amd64 (>= 1.28.3) but it is not going to be installed
Recommends: libgtk2.0-bin:amd64
libqt5svg5:amd64 : Depends: libqt5gui5:amd64 (>= 5.3.0) but it is not going to be installed or
libqt5gui5-gles:amd64 (>= 5.3.0) but it is not going to be installed
Depends: libqt5widgets5:amd64 (>= 5.3.0) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I tried to install all depended packages with “sudo apt-get install” but all I can come here. I looked up broken packages by Synaptic and Terminal, but couldn’t find anything. These depended packages are installed and works well, too. So, what should I do to install Docker Engine?