5
votes

I've been trying to install docker on a Linode instance of Ubuntu 14.04. I get to the final step and get the message: E: Unable to locate package docker-ce

I've followed this set of steps that is in many different sites, with no luck:

sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get update
sudo apt-get install docker-ce

Here's what I see when I run apt-get update:

Ign http://us.archive.ubuntu.com trusty InRelease
Hit http://us.archive.ubuntu.com trusty-security InRelease
Hit http://us.archive.ubuntu.com trusty-updates InRelease
Hit http://us.archive.ubuntu.com trusty-backports InRelease
Hit http://us.archive.ubuntu.com trusty Release.gpg
Hit http://us.archive.ubuntu.com trusty-security/main Sources
Hit http://us.archive.ubuntu.com trusty-security/restricted Sources
Hit http://us.archive.ubuntu.com trusty-security/universe Sources
Hit http://us.archive.ubuntu.com trusty-security/multiverse Sources
Hit http://us.archive.ubuntu.com trusty-security/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-security/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-security/universe i386 Packages
Hit https://download.docker.com trusty InRelease
Hit http://us.archive.ubuntu.com trusty-security/multiverse i386 Packages
Hit https://download.docker.com trusty/stable amd64 Packages
Hit http://us.archive.ubuntu.com trusty-security/main Translation-en
Hit http://us.archive.ubuntu.com trusty-security/multiverse Translation-en
Get:1 https://download.docker.com trusty/stable Translation-en_US
Hit http://us.archive.ubuntu.com trusty-security/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-security/universe Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/main Sources
Hit http://us.archive.ubuntu.com trusty-updates/restricted Sources
Hit http://us.archive.ubuntu.com trusty-updates/universe Sources
Hit http://us.archive.ubuntu.com trusty-updates/multiverse Sources
Hit http://us.archive.ubuntu.com trusty-updates/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty-updates/main Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-updates/universe Translation-en
Ign https://download.docker.com trusty/stable Translation-en_US
Hit http://us.archive.ubuntu.com trusty-backports/main Sources
Hit http://us.archive.ubuntu.com trusty-backports/restricted Sources
Ign https://download.docker.com trusty/stable Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/universe Sources
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://us.archive.ubuntu.com trusty-backports/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://us.archive.ubuntu.com trusty Release
Hit http://us.archive.ubuntu.com trusty/main Sources
Hit http://us.archive.ubuntu.com trusty/restricted Sources
Hit http://us.archive.ubuntu.com trusty/universe Sources
Hit http://us.archive.ubuntu.com trusty/multiverse Sources
Hit http://us.archive.ubuntu.com trusty/main i386 Packages
Hit http://us.archive.ubuntu.com trusty/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty/main Translation-en
Hit http://us.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty/universe Translation-en
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US

Also, here's what /etc/apt/sources.list contains:

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable

Any suggestions on what might be amiss? I ran the same set of commands on a fresh Ubuntu 16.04 instance, and Docker installed just fine. This 14.04 instance has a lot going on, so I'm not inclined to start with a fresh one.

2
Did you ever get this solved? I'm having the exact same problem after following the same apt-get sequences you went through.tgoneil
No, I ended up starting up a brand new instance on Ubuntu 16.04. It was less than ideal as I didn't want to have another instance but that was the only way I could find.jwoww
Thanks for getting back to me, @jwoww. Turns out the problem at my end was the expression, "$(lsb_release -cs)" in the add-apt-repository command. It returned "rosa", as I'm using Linux Mint. Since the underlying basis for my version of mint is Ubuntu "trusty", all I had to do was replace "$(lsb_release -cs)" with "trusty" and then voila. Problem. Solved. I'm glad you found your solution also!tgoneil
Same problem on a Ubuntu 14.04 virtual machine.nbeuchat

2 Answers

0
votes

**Hello, you can try to download the .deb file on this page:

https://apt.dockerproject.org/repo/pool/testing/d/docker-engine/

Then install it with the command:

sudo dpkg -i /path/to/package.deb

To make sure it was installed, just type:

sudo docker run hello-world

and that’s it. Hope it works!

0
votes

sudo apt-get update

exit the terminal session and return.

it works for me.