Docker Community Forums

Share and learn in the Docker community.

Subprocess installed post-installation script returned error exit status 1

I’m using Kali Linux 2017.1 Release | Kali Linux and trying to follow Get Docker CE for Debian | Docker Documentation:

root@kali:~# apt-get install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/20.6 MB of archives.
After this operation, 96.2 MB of additional disk space will be used.
Selecting previously unselected package docker-ce.
(Reading database ... 345318 files and directories currently installed.)
Preparing to unpack .../docker-ce_17.06.1~ce-0~debian_amd64.deb ...
Unpacking docker-ce (17.06.1~ce-0~debian) ...
Setting up docker-ce (17.06.1~ce-0~debian) ...
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; disabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2017-08-31 11:25:18 EDT; 4ms ago
  Process: 20853 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 20853 (code=exited, status=1/FAILURE)
      CPU: 80ms

Aug 31 11:25:18 kali systemd[1]: docker.service: Unit entered failed state.
Aug 31 11:25:18 kali 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 systemd (234-2.3) ...
Processing triggers for man-db ( ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

while starting docker.service, I noticed following error in /var/log/syslog:

Aug 31 15:48:49 kali dockerd[2360]: Error starting daemon: Error initializing network controller: list bridge addresses failed: no available network

Please advise)

I found a workaround

root@kali:~# cat /etc/systemd/network/ 


follow by systemctl restart systemd-networkd.service (will disconnect network) and by systemctl start docker.service

I’m not exactly sure what it does, but it fixed my problem too, thanks. After I apt-get remove and then apt-get install, there was no problem.

I encountered the same problem when installing docker-ce and this fixed it for me.
I created the file as described and ran

$ sudo systemctl restart systemd-networkd.service # (disconnected network)
$ sudo apt remove docker-ce # If you hadn't done so before
$ sudo apt install docker-ce # Should start docker.service
$ sudo systemctl status docker.service  # Verify docker.service is running

At this point I’d lost internet connection, to try and restore it I rollbacked my actions:
I removed the file /etc/systemd/network/ again and restarted systemd-networkd.service, to no avail.
I then rebooted my computer, after which the internet connection was restored and the docker.service was running normally…
I probably just needed to reboot to restore network connection, but removing the file hasn’t broken docker.service either.
After the reboot I could succesfully run

$ sudo docker pull hello-world

I do have a VPN running (PIA) so maybe this interfered with docker network configuration.

1 Like

My VPN was the issue, turned it off and the error went and way and hello world app ran.