Docker Community Forums

Share and learn in the Docker community.

Problem installing docker on Ubuntu Xenial 16.04

The install doc here: says I can install this on Ubuntu 16.04. This is the error I’m getting on step 11 of the installation instructions:

root@ubuntu:/# apt-cache policy docker-engine
N: Unable to locate package docker-engine

I couldn’t find anything when searching these forums or on google for my scenario. I’m sure I’m just doing something stupid, I’m not familiar with installing programs with Ubuntu. Here is my os info:

~|⇒ uname -a
Linux ubuntu 4.4.0-15-generic #31-Ubuntu SMP Fri Mar 18 19:08:31 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

~|⇒ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04
Codename: xenial

I am running this in vmware workstation player 12. I just downloaded and installed all of this yesterday. It’s 64bit, not 32 (the one article in these forums that was somewhat similar to my problem had someone trying to install it on a 32 bit install).

This is my docker.list file (I created this based on the information in step 7 of the instructions above):

root@ubuntu:/# cat /etc/apt/sources.list.d/docker.list
deb ubuntu-xenial main

There’s nothing else in that directory

root@ubuntu:/# ll /etc/apt/sources.list.d/
total 12
drwxr-xr-x 2 root root 4096 Apr 15 08:20 ./
drwxr-xr-x 6 root root 4096 Apr 15 08:19 …/
-rw-r–r-- 1 root root 58 Apr 15 08:20 docker.list

The apt-transport-https and ca-certificates install went fine. There was no error running the apt-key command. I’ve run apt-get update multiple times and restarted the vm. I have no idea what else to try. Any help is greatly appreciated.

This Github discussion might help:

Seems it is in the repo, but there’s still some kind of issue installing. They appear to be working on it though so I’m sure it’ll be sorted out soon.

1 Like

Thank you very much for the info! I read through that and it looks like that explains what I’m seeing. I went ahead and downloaded/installed Ubuntu vm (15.10 wily) and everything works fine there. I’ll check back in a few days to see if they get xenial sorted out. Hope you have a great weekend random stranger!

Is this still an issue? I just ran into the same thing on a new 16.04 machine.

1 Like

I’m also experiencing issues although unlike the OP I can get a result for apt-cache policy:

stuart@stuart-office:$ sudo apt-cache policy docker-engine
  Installed: (none)
  Candidate: 1.11.2-0~xenial
  Version table:
     1.11.2-0~xenial 500
        500 ubuntu-xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     1.11.1-0~xenial 500
        500 ubuntu-xenial/main amd64 Packages
     1.11.0-0~xenial 500
        500 ubuntu-xenial/main amd64 Packages

However for me, it fails on dpkg --configure step as shown by the output below:

stuart@stuart-office:$ sudo apt-get install docker-engine 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  aufs-tools cgroupfs-mount
The following NEW packages will be installed
  aufs-tools cgroupfs-mount docker-engine
0 to upgrade, 3 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/14.6 MB of archives.
After this operation, 73.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package aufs-tools.
(Reading database ... 231071 files and directories currently installed.)
Preparing to unpack .../aufs-tools_1%3a3.2+20130722-1.1ubuntu1_amd64.deb ...
Unpacking aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.2_all.deb ...
Unpacking cgroupfs-mount (1.2) ...
Selecting previously unselected package docker-engine.
Preparing to unpack .../docker-engine_1.11.2-0~xenial_amd64.deb ...
Unpacking docker-engine (1.11.2-0~xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu6) ...
Setting up aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Setting up cgroupfs-mount (1.2) ...
Setting up docker-engine (1.11.2-0~xenial) ...
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.
dpkg: error processing package docker-engine (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
1 Like

I’ve run into the same error. @programster were you able to resolve the issue?

1 Like

@joshjhall I can only confirm that I tried again fairly recently and still had issues. I don’t get issues when installing on ubuntu server VB instances though so I think it’s related to Ubuntu Desktop packages.

Same problem for me, anyone got any work around?

Sadly not. I’ve ended up just using Virtualbox instances. Works find on ubuntu 16.04 server and debian 8…

My bad, was on 32 bit, need to reinstall OS :S

I had same issue. I found out that it was due to the fact that I created my own deamon.json in /etc/docker. When I removed it, docker upgraded just fine and started working.
If you wonder, my daemon.json:

    "iptables": true,
    "ipv6": true
1 Like

Digging a bit deeper it seems, that the problem is IPv6. Not sure why.