gpt4 book ai didi

docker - 从 Dockerfile 构建并获取 "The following signatures couldn' t 被验证,因为公钥不可用 : NO_PUBKEY"

转载 作者:行者123 更新时间:2023-12-02 19:45:34 30 4
gpt4 key购买 nike

我正在尝试使用启动的 Dockerfile 构建 PHP 5.3/Apache 以供本地使用:

FROM php:5.3-apache

RUN apt-get update && \
apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev
但是当“阅读包裹 list ”时,我得到:
W: GPG error: http://security.debian.org jessie/updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9D6D8F6BC857C906 NO_PUBKEY AA8E81B4331F7F50
W: GPG error: http://http.debian.net jessie-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010
W: GPG error: http://http.debian.net jessie Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010
看完 this page我尝试在第一行之后添加:
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AA8E81B4331F7F50 && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010
但是得到这个错误:
W: There is no public key available for the following key IDs:
9D6D8F6BC857C906
W: Failed to fetch http://http.debian.net/debian/dists/jessie/Release.gpg Connection failed [IP: 130.89.148.77 80]
对 Ubuntu 与 Debian 几乎一无所知,我尝试了相同的方法,但使用了 keyring.debian.org代替 keyserver.ubuntu.com并得到:
gpgkeys: key AA8E81B4331F7F50 can't be retrieved
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
来自 another question我试过这个:
RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys AA8E81B4331F7F50
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 7638D0442B90D010
但得到与原来相同的 GPG 错误。
我现在很困惑如何进行。 (我知道 PHP 5.3 已经过时了,但很遗憾我无法改变它。)

最佳答案

来自 http://forums.debian.net/viewtopic.php?f=10&t=141778 ,一种解决方案是。

gpg --recv-keys AA8E81B4331F7F50
gpg --export AA8E81B4331F7F50| apt-key add -
Dockerfile 可能如下所示:
FROM php:5.3-apache

RUN for key in AA8E81B4331F7F50 7638D0442B90D010 9D6D8F6BC857C906; do \
gpg --recv-keys "$key" \
&& gpg --export "$key" | apt-key add - ; \
done

RUN apt-get update && \
apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev

关于docker - 从 Dockerfile 构建并获取 "The following signatures couldn' t 被验证,因为公钥不可用 : NO_PUBKEY",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63472872/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com