LoginSignup
13
11

More than 5 years have passed since last update.

docker-ce インストールに失敗した場合の対処

Last updated at Posted at 2018-09-07

インストール失敗…。

CentOSでdockerをインストールしようとしてうまくいかない。この事象は初めてだが。

[root@]# yum install docker-ce
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp-srv2.kddilabs.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ docker-ce.x86_64 0:18.06.1.ce-3.el7 を インストール
--> 依存性の処理をしています: container-selinux >= 2.9 のパッケージ: docker-ce-18.06.1.ce-3.el7.x86_64
--> 依存性の処理をしています: libltdl.so.7()(64bit) のパッケージ: docker-ce-18.06.1.ce-3.el7.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ docker-ce.x86_64 0:18.06.1.ce-3.el7 を インストール
--> 依存性の処理をしています: container-selinux >= 2.9 のパッケージ: docker-ce-18.06.1.ce-3.el7.x86_64
---> パッケージ libtool-ltdl.x86_64 0:2.4.2-22.el7_3 を インストール
--> 依存性解決を終了しました。
エラー: パッケージ: docker-ce-18.06.1.ce-3.el7.x86_64 (docker-ce-stable)
             要求: container-selinux >= 2.9
 問題を回避するために --skip-broken を用いることができます。
 これらを試行できます: rpm -Va --nofiles --nodigest

rpm -Va --nofiles --nodigestをやっても全く戻ってこないので意味なし。

色々探しててこれを見つける。

微妙なのは一杯あるのだが、私はyumでちゃんとinstallしたいし、container-selinuxのVerも規定なんてしたくない。というわけで↓を参考にした。
https://github.com/docker/for-linux/issues/20
世界各国悩んでいるのは同じようだ。

対処

yumでExtraリポジトリを有効にする。

[root@]# yum-config-manager --enable Extra

[root@]# yum repolist all | grep extras
 * extras: ftp.iij.ad.jp
C7.0.1406-extras/x86_64            CentOS-7.0.1406 - Extras          無効
C7.1.1503-extras/x86_64            CentOS-7.1.1503 - Extras          無効
C7.2.1511-extras/x86_64            CentOS-7.2.1511 - Extras          無効
C7.3.1611-extras/x86_64            CentOS-7.3.1611 - Extras          無効
C7.4.1708-extras/x86_64            CentOS-7.4.1708 - Extras          無効
extras/7/x86_64                    CentOS-7 - Extras                 有効:   402
extras-source/7                    CentOS-7 - Extras Sources         無効

container-selinuxをインストール

[root@]# yum install container-selinux
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp-srv2.kddilabs.jp
 * extras: ftp-srv2.kddilabs.jp
base                                                                                 | 3.6 kB  00:00:00     
extras                                                                               | 3.4 kB  00:00:00     
extras/7/x86_64/primary_db                                                           | 187 kB  00:00:00     
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ container-selinux.noarch 2:2.68-1.el7 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

============================================================================================================
 Package                         アーキテクチャー     バージョン                 リポジトリー          容量
============================================================================================================
インストール中:
 container-selinux               noarch               2:2.68-1.el7               extras                36 k

トランザクションの要約
============================================================================================================
インストール  1 パッケージ

総ダウンロード容量: 36 k
インストール容量: 36 k
Is this ok [y/d/N]: y
Downloading packages:
container-selinux-2.68-1.el7.noarch.rpm                                              |  36 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : 2:container-selinux-2.68-1.el7.noarch                                       1/1 
setsebool:  SELinux is disabled.
  検証中                  : 2:container-selinux-2.68-1.el7.noarch                                       1/1 

インストール:
  container-selinux.noarch 2:2.68-1.el7                                                                     

完了しました!

docker-ceをインストール

[root@]# yum install docker-ce
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp-srv2.kddilabs.jp
 * extras: ftp-srv2.kddilabs.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ docker-ce.x86_64 0:18.06.1.ce-3.el7 を インストール
--> 依存性の処理をしています: libltdl.so.7()(64bit) のパッケージ: docker-ce-18.06.1.ce-3.el7.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ libtool-ltdl.x86_64 0:2.4.2-22.el7_3 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

============================================================================================================
 Package                  アーキテクチャー   バージョン                    リポジトリー                容量
============================================================================================================
インストール中:
 docker-ce                x86_64             18.06.1.ce-3.el7              docker-ce-edge              41 M
依存性関連でのインストールをします:
 libtool-ltdl             x86_64             2.4.2-22.el7_3                base                        49 k

トランザクションの要約
============================================================================================================
インストール  1 パッケージ (+1 個の依存関係のパッケージ)

総ダウンロード容量: 41 M
インストール容量: 41 M
(中略)
インストール:
  docker-ce.x86_64 0:18.06.1.ce-3.el7                                                                       

依存性関連をインストールしました:
  libtool-ltdl.x86_64 0:2.4.2-22.el7_3                                                                      

完了しました!

やったね!

13
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
11