Unable to locate package docker-engine

69,044

Solution 1

Try 'uname -a' and make sure you're running a 64-bit architecture:

Docker requires a 64-bit installation regardless of your Ubuntu version.

https://docs.docker.com/engine/installation/linux/ubuntulinux/

Solution 2

As mentioned in the comments, you have to

  1. find out your distribution name via lsb_release -c
  2. the file /etc/apt/sources.list.d/docker.list should have the following content (and nothing else): deb https://apt.dockerproject.org/repo ubuntu-VERSION-NAME main

In my case (Ubuntu 14.04 aka 'trusty') I added deb https://apt.dockerproject.org/repo ubuntu-trusty main

Solution 3

I fixed this issue by running apt-get update followed by apt-get install docker.io

Share:
69,044

Related videos on Youtube

praveen
Author by

praveen

Updated on September 18, 2022

Comments

  • praveen
    praveen over 1 year

    I'm trying to install docker on Ubuntu in vmware, unsuccessfully. These are the commands and errors I experience.

    sudo apt-get update
    
    sudo apt-get install docker-engine
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package docker-engine
    
    • NIMISHAN
      NIMISHAN over 8 years
      Make sure you have installed the prerequisites for your Ubuntu version. Then, install Docker.
    • praveen
      praveen over 8 years
      I already followed the steps in prerequisites sudo apt-get install linux-image-extra-$(uname -r)
    • Tung Tran
      Tung Tran over 8 years
      Have you created /etc/apt/sources.list.d/docker.list and add the correct deb entries for your Ubuntu?
    • praveen
      praveen over 8 years
      Thanks, earlier it is unable to create the /etc/apt/sources.list.d/docker.list after trying & trying finally it got created and successfully installed the docker in my machine.... thanks again.......!
    • igx
      igx over 8 years
      Actually I am having the same issue although .../docker.list is correct avi@guest-Inspiron-1464:~$ cat /etc/apt/sources.list.d/docker.list deb apt.dockerproject.org/repo ubuntu-trusty main avi@guest-Inspiron-1464:~$ apt-cache policy docker-engine N: Unable to locate package docker-engine
    • praveen
      praveen over 8 years
      perform all the actions (commands) as root, otherwise it wont create properly -- once again follow the steps from starting in docs in docker site : docs.docker.com/engine/installation/ubuntulinux
    • norlin
      norlin over 8 years
      I've added sources, also have tried to use Docker's shell script to install all automatically, but still got E: Unable to locate package docker-engine for all cases...
    • NauticalMile
      NauticalMile about 8 years
      @praveen Did you call sudo apt-get update after modifying docker.list? That did the trick for me.
  • Caz
    Caz over 7 years
    Look at docs.docker.com/engine/installation/linux/ubuntulinux where there are detailed instructions on setting up apt and related keys to get docker. I had it installed via docker.io (the package maintained by ubuntu) which left me with an unresolved docker-engine package trying to install nvidia-docker. I had to uninstall and purge docker.io before getting docker-engine installed.