web-dev-qa-db-ja.com

Ubuntu 16.04の最新アップデートによりDocker(docker-ce)が破損しました

デスクトップでUbuntu 16.04を実行しています。私はdocker-ceを使用していますが、数日前まで機能していました。 Ubuntuの自動更新が壊れているようです。

robert@catness:~$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

https://docs.docker.com/install/linux/docker-ce/ubuntu/ の指示に従って削除して再インストールしようとしましたが、うまくいきませんでした。

robert@catness:~$ Sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
docker-ce is already the newest version (5:18.09.0~3-0~ubuntu-xenial).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
 docker-ce : Depends: containerd.io but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

問題はcontainerd.ioにあると思います。コマンドSudo apt-get -f installは、インストールを試みますが、次のエラーが発生します。

The following additional packages will be installed:
  containerd.io
The following NEW packages will be installed
  containerd.io
0 to upgrade, 1 to newly install, 0 to remove and 1 not to upgrade.
1 not fully installed or removed.
Need to get 0 B/19.9 MB of archives.
After this operation, 87.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 523620 files and directories currently installed.)
Preparing to unpack .../containerd.io_1.2.0-1_AMD64.deb ...
Unpacking containerd.io (1.2.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/containerd.io_1.2.0-1_AMD64.deb (--unpack):
 trying to overwrite '/usr/sbin/runc', which is also in package runc 1.0.0~rc2+docker1.13.1-0ubuntu1~16.04.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/containerd.io_1.2.0-1_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

/ usr/sbin/runcに問題がありました。デバッグの一環として、そこでファイルを削除しようとしましたが、これはまったく違いはありません。

robert@catness:~$ ls /usr/sbin/runc
ls: cannot access '/usr/sbin/runc': No such file or directory
robert@catness:~$ Sudo ls /usr/sbin/runc
ls: cannot access '/usr/sbin/runc': No such file or directory

この問題を調査するために次に何をすべきかについての提案はありますか?.

16
Robert3452

runcパッケージを削除します。 docker1.13.1バージョンは、非常に古く、サポートされていないバージョンのdockerへのポインターであるため、これはおそらく過去のアップグレードから残っています。その後、containerd.ioをインストールできるはずです。

最初にapt-get remove docker-ceを使用してdocker-ceパッケージを削除し、次にapt-get remove runcを実行してからdocker-ceを再度インストールする必要があります。 apt-get install docker-ceを使用します。これは、最初にdocker-ceを削除せずにruncを削除しようとしても機能しないためです。

問題がまだ存在しない場合、この問題をdockerで開きたいので、成功したかどうかを教えてください。

30
BMitch