没有可用于以下密钥 ID 的公钥:AA8E81B4331F7F50

没有可用于以下密钥 ID 的公钥:AA8E81B4331F7F50

下面的命令:

RUN apt-get update -y && \
    apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y && \
    easy_install pip

给出错误:

Step 9/14 : RUN apt-get update -y &&     apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y &&     easy_install pip
 ---> Running in 25a6ae724b15
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://httpredir.debian.org jessie InRelease
Get:2 http://httpredir.debian.org jessie-updates InRelease [16.3 kB]
Ign http://httpredir.debian.org jessie-backports InRelease
Get:3 http://httpredir.debian.org jessie Release.gpg [1652 B]
Ign http://httpredir.debian.org jessie-backports Release.gpg
Get:4 http://httpredir.debian.org jessie Release [77.3 kB]
Ign http://httpredir.debian.org jessie-backports Release
Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Err http://httpredir.debian.org jessie-backports/main amd64 Packages
  404  Not Found
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [901 kB]
Get:6 http://httpredir.debian.org jessie-updates/main amd64 Packages [20 B]
Get:7 http://httpredir.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 10.1 MB in 17s (573 kB/s)
W: There is no public key available for the following key IDs:
AA8E81B4331F7F50
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
ERROR: Service 'jenkins' failed to build: The command '/bin/sh -c apt-get update -y &&     apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y &&     easy_install pip' returned a non-zero code: 100

要尝试解决此错误,请执行以下更改:

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 && \
    apt-get update -y && \
    apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y && \
    easy_install pip

问题仍然存在,并出现以下错误:

Step 9/14 : RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 &&     apt-get update -y &&     apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y &&     easy_install pip
 ---> Running in d51497786a78
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.XQtj1WUFSF --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-wheezy-stable.gpg --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50
gpg: requesting key 331F7F50 from hkp server keyserver.ubuntu.com
gpg: key 8AE22BA9: public key "Debian Security Archive Automatic Signing Key (9/stretch) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
Ign http://httpredir.debian.org jessie InRelease
Get:1 http://httpredir.debian.org jessie-updates InRelease [16.3 kB]
Get:2 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://httpredir.debian.org jessie-backports InRelease
Get:3 http://httpredir.debian.org jessie Release.gpg [1652 B]
Ign http://httpredir.debian.org jessie-backports Release.gpg
Get:4 http://httpredir.debian.org jessie Release [77.3 kB]
Ign http://httpredir.debian.org jessie-backports Release
Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Get:5 http://httpredir.debian.org jessie-updates/main amd64 Packages [20 B]
Err http://httpredir.debian.org jessie-backports/main amd64 Packages

Get:6 http://httpredir.debian.org jessie/main amd64 Packages [9098 kB]
Get:7 http://security.debian.org jessie/updates/main amd64 Packages [901 kB]
Err http://httpredir.debian.org jessie-backports/main amd64 Packages
  404  Not Found
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
Fetched 10.1 MB in 17s (587 kB/s)
ERROR: Service 'jenkins' failed to build: The command '/bin/sh -c apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 &&     apt-get update -y &&     apt-get install apt-transport-https curl python-dev python-setuptools gcc make libssl-dev -y &&     easy_install pip' returned a non-zero code: 100

1)这个错误是什么意思?

2)如何解决这个错误?

答案1

AA8E81B4331F7F50 是 Stretch(在 Jessie 之后发布)签名密钥。您可以通过安装更新​​的debian-archive-keyring软件包来解决这个问题,但我怀疑您是否真的需要这样做。

然而,你更大的问题是你正在使用 jessie-backports。那是与 Jessie 一起停产的(向后移植没有得到长期支持)。如果您想使用旧的、不受支持的 jessie-backports 软件包,您需要从中获取它们http://archive.debian.org/debian/dists/jessie-backports/。此外,归档材料不会重新签名,因此签名已过期。每无法获取 Jessie 向后移植存储库,该sources.list条目将如下所示:

deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main

也,httpredir.debian.org不再是;你可能想要的deb.debian.org是。看https://deb.debian.org/以获得指示。

(当然,您真正应该做的是在当前版本上构建容器,Buster。)

相关内容