Problems installing docker on 16.04: “Failed to start Docker Application Container Engine.”

[about docker for Linux / Ubuntu (desktop), cannot find such a category?]

Just tried to install docker on my Ubuntu 16.04, and I get the error below. Any suggestions what is wrong and how to fix it?

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Fri 2017-07-28 12:39:11 CEST; 9ms ago
  Process: 15533 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 15533 (code=exited, status=1/FAILURE)

Jul 28 12:39:11 jonas-X555LAB systemd[1]: Failed to start Docker Application Container Engine.
Jul 28 12:39:11 jonas-X555LAB systemd[1]: docker.service: Unit entered failed state.
Jul 28 12:39:11 jonas-X555LAB systemd[1]: docker.service: Failed with result 'exit-code'.
dpkg: error processing package docker-ce (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I followed this guide:

$ curl -fsSL | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
sudo apt-get update

$ sudo apt-cache policy docker-ce
  Installed: 17.06.0~ce-0~ubuntu
  Candidate: 17.06.0~ce-0~ubuntu
  Version table:
 *** 17.06.0~ce-0~ubuntu 500
        500 xenial/stable amd64 Packages
        500 xenial/edge amd64 Packages
        100 /var/lib/dpkg/status
     17.05.0~ce-0~ubuntu-xenial 500
        500 xenial/edge amd64 Packages
     17.04.0~ce-0~ubuntu-xenial 500
        500 xenial/edge amd64 Packages
     17.03.2~ce-0~ubuntu-xenial 500
        500 xenial/stable amd64 Packages
     17.03.1~ce-0~ubuntu-xenial 500
        500 xenial/stable amd64 Packages
     17.03.0~ce-0~ubuntu-xenial 500
        500 xenial/stable amd64 Packages

$ sudo apt-get install -y docker-ce

On this same machine, I have a Linux Mint 17.3 installation on which docker worked just fine. Using same home directory as before on LM17.3.

Here are some specs:

$ inxi -fs
CPU:       Dual core Intel Core i3-4005U (-HT-MCP-) cache: 3072 KB 
           clock speeds: max: 1600 MHz 1: 799 MHz 2: 799 MHz 3: 799 MHz 4: 799 MHz
           CPU Flags: abm acpi aes aperfmperf apic arat arch_perfmon avx avx2 bmi1 bmi2 bts clflush cmov
           constant_tsc cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept erms est f16c flexpriority fma fpu fsgsbase
           fxsr ht invpcid lahf_lm lm mca mce mmx monitor movbe msr mtrr nonstop_tsc nopl nx pae pat pbe pcid
           pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pts rdrand rdtscp rep_good sdbg sep smep ss
           sse sse2 sse4_1 sse4_2 ssse3 syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx vnmi
           vpid xsave xsaveopt xtopology xtpr
Sensors:   System Temperatures: cpu: 40.5C mobo: N/A
           Fan Speeds (in rpm): cpu: 2800

Posted same question on askubuntu without luck:

This is a major blocking issue for me in doing my job. Anyone out there that can help?
I tried to follow this tutorial with the same result:

1 Like

It works now. It appears that docker-ce was installed all along and that it failed because I tried to install it again. Very odd. Normally, if you try to install a package that is already installed, you get something like this:

$ sudo apt install mypackage
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mypackage is already the newest version (5.7.19-0ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.

Perhaps the problem was that I had added different repos to /etc/apt/sources.list based on the different tutorials I followed. Embarrassing that I hadn’t noticed that the service was running in the background all along and working just fine … :confused:

1 Like