DOCKER インストール エラー - libdevmapper1.02.1 (>= 2:1.02.99)

DOCKER インストール エラー - libdevmapper1.02.1 (>= 2:1.02.99)

dockerインストール手順に従うとUbuntu問題が発生します:

kp@maas:~$ sudo apt install docker-engine
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 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.

同じ問題を抱えている人はいますか?また、解決方法を知っている人はいますか?

/etc/apt/sources.list.d/docker.list は正しいですか?

# Ubuntu Precise
deb https://apt.dockerproject.org/repo ubuntu-precise main
# Ubuntu Trusty
deb https://apt.dockerproject.org/repo ubuntu-trusty main
# Ubuntu Vivid
deb https://apt.dockerproject.org/repo ubuntu-vivid main
# Ubuntu Wily
deb https://apt.dockerproject.org/repo ubuntu-wily main

出力: apt-cache policy docker-engine libdevmapper1.02.1

kp@maas:~$ apt-cache policy docker-engine libdevmapper1.02.1
docker-engine:
  Installed: (none)
  Candidate: 1.8.3-0~wily
  Version table:
     1.8.3-0~wily 0
        500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.8.3-0~vivid 0
        500 https://apt.dockerproject.org/repo/ ubuntu-vivid/main amd64 Packages
     1.8.3-0~trusty 0
        500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Package                                        s
     1.8.3-0~precise 0
        500 https://apt.dockerproject.org/repo/ ubuntu-precise/main amd64 Packag                                        es
     1.8.2-0~wily 0
        500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.8.2-0~vivid 0
        500 https://apt.dockerproject.org/repo/ ubuntu-vivid/main amd64 Packages
     1.8.2-0~trusty 0
        500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Package                                        s
     1.8.2-0~precise 0
        500 https://apt.dockerproject.org/repo/ ubuntu-precise/main amd64 Packag                                        es
     1.8.1-0~wily 0
        500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.8.1-0~vivid 0
        500 https://apt.dockerproject.org/repo/ ubuntu-vivid/main amd64 Packages
     1.8.1-0~trusty 0
        500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Package                                        s
     1.8.1-0~precise 0
        500 https://apt.dockerproject.org/repo/ ubuntu-precise/main amd64 Packag                                        es
     1.8.0-0~wily 0
        500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.8.0-0~vivid 0
        500 https://apt.dockerproject.org/repo/ ubuntu-vivid/main amd64 Packages
     1.8.0-0~trusty 0
        500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Package                                        s
     1.8.0-0~precise 0
        500 https://apt.dockerproject.org/repo/ ubuntu-precise/main amd64 Packag                                        es
     1.7.1-0~wily 0
        500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.7.1-0~vivid 0
        500 https://apt.dockerproject.org/repo/ ubuntu-vivid/main amd64 Packages
     1.7.1-0~trusty 0
        500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Package                                        s
     1.7.1-0~precise 0
        500 https://apt.dockerproject.org/repo/ ubuntu-precise/main amd64 Packag                                        es
     1.7.0-0~vivid 0
        500 https://apt.dockerproject.org/repo/ ubuntu-vivid/main amd64 Packages
     1.7.0-0~trusty 0
        500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Package                                        s
libdevmapper1.02.1:
  Installed: 2:1.02.90-2ubuntu1
  Candidate: 2:1.02.90-2ubuntu1
  Version table:
 *** 2:1.02.90-2ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
        100 /var/lib/dpkg/status
kp@maas:~$

答え1

リポジトリを追加しましたUbuntuリリース。あなたのUbuntuリリースはVividです。したがって、問題を修正するには

sudo sed -i '/wily/d' /etc/apt/sources.list.d/docker.list
sudo sed -i '/trusty/d' /etc/apt/sources.list.d/docker.list
sudo sed -i '/precise/d' /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install docker-engine

答え2

docker.list には、Ubuntu バージョンのリポジトリのみを含める必要があります。私の場合は、Ubuntu Utopic を使用しているので、次のように/etc/apt/sources.list.d/docker.listなります。

# Ubuntu Utopic
deb https://apt.dockerproject.org/repo ubuntu-utopic main

答え3

別の方法としては、インストールするバージョンを指定することもできます。

利用可能なすべてのリストを参照してください:

$ apt-cache policy docker-engine
docker-engine:
  Installed: (none)
  Candidate: 1.12.0-0~wily
  Version table:
     1.12.0-0~wily 0
        500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     1.12.0-0~trusty 0
        500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
     1.12.0-0~precise 0
        500 https://apt.dockerproject.org/repo/ ubuntu-precise/main amd64 Packages
     1.11.2-0~wily 0
        500 https://apt.dockerproject.org/repo/ ubuntu-wily/main amd64 Packages
     ...

次に、Ubuntu Trusty に特定のものをインストールするには、次の手順を実行します。

sudo apt-get install docker-engine=1.12.0-0~trusty

関連情報