Skip to main content
本文に 52 文字追加
ソース リンク
cubick
  • 2.1万
  • 5
  • 27
  • 64
ソース リンク
taka
  • 5
  • 2

Ubuntu 20.04 で docker をインストールしたい

環境:

ubuntu@user:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal

下記のサイトを参考にしました。
https://qiita.com/m-tmatma/items/5718ac5294e6acc61908

ubuntu@user:~$ sudo apt update -y
Hit:1 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64  InRelease
Hit:2 https://download.docker.com/linux/ubuntu focal InRelease                            
Hit:3 https://nvidia.github.io/nvidia-container-runtime/stable/ubuntu18.04/amd64  InRelease
Hit:4 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64  InRelease                 
Hit:5 http://archive.ubuntu.com/ubuntu focal InRelease                                    
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease    
Hit:7 http://ppa.launchpad.net/git-core/ppa/ubuntu focal InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:9 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
ubuntu@user:~$ sudo apt upgrade -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

下記のエラーが出されます。
どのように対処すればよいでしょうか?

ubuntu@user:~$ sudo apt install -y docker.io docker-compose
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.io : Depends: containerd (>= 1.2.6-0ubuntu1~)
E: Unable to correct problems, you have held broken packages.