LoginSignup
1
1

More than 1 year has passed since last update.

MintにDockerをインストールしたいときに要注意

Posted at

インストール

MintにDockerをインストールしようと思ったら躓いたからメモ

リポジトリには Release ファイルがありません。

$ apt update

<中略>

E: リポジトリ https://download.docker.com/linux/ubuntu vera Release には Release ファイルがありません。
N: このようなリポジトリから更新を安全に行うことができないので、デフォルトでは更新が無効になっています。
N: リポジトリの作成とユーザ設定の詳細は、apt-secure(8) man ページを参照してください。

NANNYAKORE

対処法

add-apt-repositoryをした場合

apt updateをすると、以下のようなエラーが出ます。

ayato@ayato-app-dev:~/42tokyo/ft_transcendence$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
ayato@ayato-app-dev:~/42tokyo/ft_transcendence$ sudo apt update
ヒット:1 http://packages.microsoft.com/repos/code stable InRelease
無視:2 https://download.docker.com/linux/ubuntu vera InRelease                                                                                                                                                 
無視:3 http://packages.linuxmint.com vera InRelease                                                                                                                                                            
ヒット:4 http://archive.ubuntu.com/ubuntu jammy InRelease                                                                                                 
ヒット:5 http://packages.linuxmint.com vera Release                                                                         
ヒット:6 http://security.ubuntu.com/ubuntu jammy-security InRelease                                                       
エラー:7 https://download.docker.com/linux/ubuntu vera Release                              
  404  Not Found [IP: 13.32.50.48 443]
ヒット:8 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
ヒット:10 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
パッケージリストを読み込んでいます... 完了
E: リポジトリ https://download.docker.com/linux/ubuntu vera Release には Release ファイルがありません。
N: このようなリポジトリから更新を安全に行うことができないので、デフォルトでは更新が無効になっています。
N: リポジトリの作成とユーザ設定の詳細は、apt-secure(8) man ページを参照してください。

追加したレポジトリを削除する

sudo add-apt-repository --remove "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

echo "deb [arch=...した場合

echo   "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
  "$(. /etc/os-release && echo "$UBUNTU_CODENAME")" stable" |   sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

こんな感じのコマンドをたたいた場合、sudo apt updateすると同じようなエラーが発生する。

レポジトリを削除する

$ sudo rm /etc/apt/sources.list.d/docker.list

正しいレポジトリの追加

以上の手順を踏んだ後に以下のコマンドを実行する

$ sudo apt update

$ cat /etc/os-release
NAME="Linux Mint"
VERSION="21.1 (Vera)"
ID=linuxmint
ID_LIKE="ubuntu debian"
PRETTY_NAME="Linux Mint 21.1"
VERSION_ID="21.1"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=vera
UBUNTU_CODENAME=jammy

UBUNTU_CODENAMEというところのjammyを利用します。

以下コマンドで追加する。

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu jammy stable"
$ sudo apt update
$ sudo apt install docker-ce

まとめ

ひっかけ問題みたいだあった。

1
1
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
1
1