Docker-engine confilcts with docker.io

596 views Asked by At

OS: Ubuntu 16.04

Docker version: 1.11.2

I have already installed docker 1.11.2 on my Ubuntu and I want to upgrade it to 1.12. All the steps are as follows:

  1. I download the deb pkg named docker-engine_1.12.3-0~xenial_amd64.

  2. Execute command: dpkg -i docker-engine_1.12.3-0~xenial_amd64 but notes with errors:

    docker-engine conficts with docker.io.docker.io (version 1.11.2-0ubuntu5~16.04) has already been installed .

  3. So I have to remove docker first by using commands as below:

    service docker stop
    apt-get remove docker
    apt-get remove --auto-remove docker 
    rm -rf /var/lib/docker
    
  4. Go to step 2, but with the same errors.

So, I hope someone would help me solve this problem.

2

There are 2 answers

0
Dirk is no longer here On

The conflicting packages (which fight over the same binary) are docker.io (from the distribution) and docker-engine (from Docker itself).

Your command above does apt-get remove ... docker. Which achieve nothing for the aforementioned problem.

I have different machines running 16.04 and some use docker.io (easier, no extra repo) whereas others use docker-engine. I am indifferent. Pick on, docker should work just fine.

0
tktktk0711 On

Firstly restart the ubuntu server with linux command(sudo shutdown -r now), and run the command : apt-get -f install(this command is suggested by the error information), then I install the docker-engine by the following site(https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04).