2

I am new to Ubuntu and trying to install docker on Ubuntu 15.04 by following this link.

I have tried many times but always get the same error:

docker-engine : Depends: libdevmapper1.02.1 (>= 2:1.02.99) but  
2:1.02.90-2ubuntu1 is to be installed   
E: Unable to correct problems, you have held broken packages.
2
  • Edit your question and add the output of lsb_release -a and the output of apt-cache policy docker-engine libdevmapper1.02.1
    – A.B.
    Oct 16, 2015 at 7:17
  • And please the output of cat /etc/apt/sources.list.d/docker.list
    – A.B.
    Oct 16, 2015 at 7:31

3 Answers 3

2

You have Vivid installed, and the necessary package with the required version (2:1.02.99) is in Wily. Therefore use the Vivid version of docker. Edit /etc/apt/sources.list.d/docker.list via

sudo nano /etc/apt/sources.list.d/docker.list

and replace the content with

deb https://apt.dockerproject.org/repo ubuntu-vivid main

then update the package database

sudo apt-get update

It's also possible to install the packages in Vivid

cd
wget http://mirrors.kernel.org/ubuntu/pool/main/l/lvm2/dmsetup_1.02.99-1ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/l/lvm2/libdevmapper1.02.1_1.02.99-1ubuntu1_amd64.deb
sudo dpkg -i dmsetup_1.02.99-1ubuntu1_amd64.deb libdevmapper1.02.1_1.02.99-1ubuntu1_amd64.deb

If you have problems with the packages, downgrade via

sudo apt-get install libdevmapper1.02.1=2:1.02.90-2ubuntu1 dmsetup=2:1.02.90-2ubuntu1

Tested in my Vivid system

% apt-cache policy libdevmapper1.02.1 
libdevmapper1.02.1:
  Installed: 2:1.02.99-1ubuntu1
  Candidate: 2:1.02.99-1ubuntu1
  Version table:
 *** 2:1.02.99-1ubuntu1 0
        100 /var/lib/dpkg/status
     2:1.02.90-2ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ vivid/main i386 Packages
0

Please remove the docker-engine completely from your system.

 apt-get remove docker-engine 

Follow the below setups. To check your current kernel version, open a terminal and use uname -r to display your kernel version:

 $ uname -r 

3.11.0-15-generic Install the recommended package.

 $ sudo apt-get install linux-image-extra-$(uname -r) 

Update your APT package index.

 $ sudo apt-get update 

Install Docker.

 $ sudo apt-get install docker-engine 

Start the docker daemon.

  $ sudo service docker start 

Verify docker is installed correctly.

 $ sudo docker run hello-world 

For 15.04 and up, to configure the docker daemon to start on boot, run

 $ sudo systemctl enable docker 

http://gotechnies.com/install-docker-engine-ubuntu/

-1

I tried a combination of all the other answers and finally what solved my problem was

sudo apt-get install docker.io

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .