Installing docker hangs at "setting up docker-engine" on ubuntu xenial

7,269

Solution 1

This is because the service can't be started. You can interrupt the apt command by doing systemctl restart docker and then just following this solution: https://stackoverflow.com/a/37640824/287130

Solution 2

Try systemctl stop docker.service. That did it for me. Trying to restart it lead to a hang.

Share:
7,269

Related videos on Youtube

xyzzy
Author by

xyzzy

Updated on September 18, 2022

Comments

  • xyzzy
    xyzzy over 1 year

    I'm trying to install docker on ubuntu xenial and am following this tutorial: https://docs.docker.com/engine/installation/linux/ubuntulinux/. So far it's gone without a hitch except for there apparently not being a linux-image-extra for my kernel version (4.6.0-040600-generic). The tutorial said that that wasn't required, though, so I figured it wasn't completely necessary.

    I got to the point of running sudo apt-get install docker-engine, and the install is hanging on Setting up docker-engine (1.11.2-0~xenial) .... I've looked at top and it's not using any cpu, so I don't think it's actually doing anything. I ended up restarting my computer, getting rid of the partly installed package with some combination of dpkg -r, apt-get --purge remove, and maybe some other related stuff that I've forgotten about, and I tried installing it again. It hung the same way.

    How can I install this successfully?

  • Sebastian Barth
    Sebastian Barth about 4 years
    For me systemctl restart docker hangs, too.