debianstretchにdockerをインストールすると、gpgエラーが発生します。

debianstretchにdockerをインストールすると、gpgエラーが発生します。

私はdockerDebian 9.11 "stretch"にインストールするために次の指示に従いました。

https://docs.docker.com/engine/install/debian/

私のファイルは/etc/apt/sources.list次のとおりです

deb http://repo.myloc.de/debian stretch main non-free contrib
deb-src http://repo.myloc.de/debian stretch main non-free contrib

deb http://repo.myloc.de/debian-security stretch/updates main
deb-src http://repo.myloc.de/debian-security stretch/updates main

deb http://repo.myloc.de/debian stretch-updates main
deb-src http://repo.myloc.de/debian stretch-updates main

deb https://download.docker.com/linux/debian stretch stable
#deb-src [arch=amd64] https://download.docker.com/linux/debian stretch stable

注文する

curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -

与えられた

OK

しかし、apt update結果は

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://get.docker.com/ubuntu docker Release: The following signatures were invalid: 36A1D7869245C8950F966E92D8576A8BA88D21E9
W: Failed to fetch https://get.docker.com/ubuntu/dists/docker/Release.gpg  The following signatures were invalid: 36A1D7869245C8950F966E92D8576A8BA88D21E9
W: Some index files failed to download. They have been ignored, or old ones used instead.

そこに言及があって混乱していますubuntuが、おそらく大丈夫だと思います。

編集:コメントに追加情報が要求されました

> uname -a
Linux b028 4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 (2020-01-20) x86_64 GNU/Linux

> grep ^deb /etc/apt/sources.list.d/*
/etc/apt/sources.list.d/docker.list:deb https://get.docker.com/ubuntu docker main
/etc/apt/sources.list.d/docker.list.save:deb https://get.docker.com/ubuntu docker main
/etc/apt/sources.list.d/nodesource.list:deb https://deb.nodesource.com/node_0.12 wheezy main
/etc/apt/sources.list.d/nodesource.list:deb-src https://deb.nodesource.com/node_0.12 wheezy main
/etc/apt/sources.list.d/nodesource.list.save:deb https://deb.nodesource.com/node_0.12 wheezy main
/etc/apt/sources.list.d/nodesource.list.save:deb-src https://deb.nodesource.com/node_0.12 wheezy main

このディレクトリの内容はsources.list.dエラーの残りの可能性があります。おそらく削除する必要があります。

ベストアンサー1

はい、以下のdockerリポジトリを削除する必要があります/etc/apt/sources.list.d/(これは有効なdockerリポジトリではなく、dockerインストールスクリプトのURLです)。

sudo rm /etc/apt/sources.list.d/docker.list{,.save}

次に、次を編集しますsources.list

sudo apt edit-sources

次の行を変更します。

deb https://download.docker.com/linux/debian stretch stable

到着

deb [arch=amd64] https://download.docker.com/linux/debian stretch stable

次に、次を実行します。

sudo apt update
sudo apt install docker-ce

おすすめ記事