0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

100万人に伝えたい!失敗を乗り超えた話を共有しよう

WSL2 の Ubuntu 22.04.2 で Docker インストール時 "repository (略) does not have a Release file." のエラーが出る

Last updated at Posted at 2023-08-20

事象

Docker をインストールしようとした時に以下のようなエラーが発生する

The repository 'https://download.docker.com/linux/ubuntu $(lsb_release Release' does not have a Release file.

ぱっと見 $(lsb_release Releas のあたりが怪しい。リポジトリ先の設定が上手くいっていないよう

解決策

エラー文で検索すると似たような事案を発見。
https://stackoverflow.com/questions/68712058/docker-installation-problem-ubuntu-20-04-lts-e-the-repository-https-down

/etc/apt/sources.list.d/docker.list?

anyway, mine says deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable –
jabbson
Aug 9, 2021 at 12:40

このあたりを見て、 /etc/apt/sources.list.d/docker.list を以下のように編集

# deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu  focal stable

(念のためコメントアウトにしていたが1行目は不要)
以上の修正により無事リポジトリ更新と docker インストールに成功。

参考

備考

実行手順を見直していて思ったがリポジトリ設定時にバックスラッシュが不要な可能性...?

☁  ~  echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?