Installing Docker on Ubuntu 16.04 LTS throws error for command linux-image-extra

On Linode I’m trying to get Docker installed for Ubuntu 16.04 LTS per the installation guide at: https://docs.docker.com/engine/installation/linux/ubuntulinux/

I can get all the way to the point where I run “sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual”

and then I run into this issue:
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package linux-image-extra-4.6.5-x86_64-linode71
E: Couldn’t find any package by glob 'linux-image-extra-4.6.5-x86_64-linode71’
E: Couldn’t find any package by regex ‘linux-image-extra-4.6.5-x86_64-linode71’

I am not super familiar with Linux, am new to Docker and not feeling super confident. So please, if you post an answer, please explain it to me like I’m a third grader. :slight_smile:

Thanks

Find the output from uname -r and substitute the output in
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

If I’m understanding you, the output for uname -r is 4.6.5-x86_64-linode71. So I removed uname -r and appended that in it’s place. Here’s what it looks like, and what the error returned. Thx for your help thus far.

sudo apt-get install linux-image-extra-4.6.5-x86_64-linode71 linux-image-extra-virtual
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-image-extra-4.6.5-x86_64-linode71
E: Couldn't find any package by glob 'linux-image-extra-4.6.5-x86_64-linode71'
E: Couldn't find any package by regex 'linux-image-extra-4.6.5-x86_64-linode71'

I just resolved the issue using tips.

http://lukeberndt.com/2016/getting-docker-up-on-linode-with-ubuntu-16-04/comment-page-1/#comment-238421

The 64 bit kernel is required to install Docker on Ubuntu.
"Docker requires a 64-bit installation regardless of your Ubuntu version. "
https://docs.docker.com/engine/installation/linux/ubuntulinux/

4.6.5-x86-linode89 is 32 bit.
https://www.linode.com/kernels

Interesting. I had used the image Ubuntu Xenial 16.04 (LTS) which is listed as 64-bit. :confused:

Could you post a link to the version used because the uname -r output, which is more reliable does not indicate a 64 bit version.

Try the following commands this was fixed my issue,

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install linux-image-4.4.0-51-generic
sudo apt-get install linux-image-extra-4.4.0-51-generic
sudo apt-get install linux-image-extra-virtual