相关文章推荐
完美的消炎药  ·  地环学院学科地理研究生参加2022年浙师尖峰 ...·  6 月前    · 
爱看书的松鼠  ·  Solved: Content ...·  8 月前    · 
朝气蓬勃的李子  ·  博士研究生教育 | 上海纽约大学·  11 月前    · 
爱旅游的椅子  ·  2024华南师范大学选科要求对照表 ...·  1 年前    · 
老实的皮蛋  ·  保罗·安德鲁辞世:穿过戴高乐、浦东机场,追寻 ...·  1 年前    · 
Code  ›  由于公钥不可用,无法验证下列签名: NO_PUBKEY 871920D1991BC93C开发者社区
apt
https://cloud.tencent.com/developer/ask/sof/107286395/answer/116540779
英俊的硬盘
2 年前
首页
学习
活动
专区
工具
TVP
返回腾讯云官网
提问
问 由于公钥不可用,无法验证下列签名: NO_PUBKEY 871920D1991BC93C
Stack Overflow用户
提问于 2022-09-13 08:22:59
EN

我试图使用Ubuntu 20或Ubuntu 22在码头。我的 Dockerfile 是:

from ubuntu:22.04
run DEBIAN_FRONTEND=noninteractive apt update

我用 docker build . 构建这个。结果是:

Sending build context to Docker daemon  2.048kB
Step 1/2 : from ubuntu:22.04
---> 2dc39ba059dc
Step 2/2 : run DEBIAN_FRONTEND=noninteractive apt update
---> Running in b15002ae9dd5
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB] 
Get:2 http://security.ubuntu.com/ubuntu jammy-security 
InRelease [110 kB] 
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB] 
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB] Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease   
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C 

我收到这条消息多次重复,直到我得到:

W: http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the file is not readable by user '_apt' executing apt-key.

我尝试过将 chmod a+rwx /etc/apt -R 作为 Dockerfile 中的第一个 run 命令,但这并没有什么区别。

我还显式地运行了 docker pull ubuntu:22.04 ,它说它已经是最新的了。对于 ubuntu:20.04 图像,我也有同样的问题。

我已经咨询过所有提到这个问题的其他网页来源,但它们都要求我能够运行 apt install apt-key 或其他什么,但是我不能从 apt 开始更新,所以没有什么工作,除了前3页的搜索引擎点击仅仅显示如何在Ubuntu上安装Docker,而不是相反的方式。

我也尝试过另一个答案中提到的 --security-opt seccomp:unconfined 。 Error response from daemon: The daemon on this platform does not support setting security options on build 对此做出了回应。

因此,我的映像没有 curl 、 wget 或 gnupg ,如果没有这个功能,我就无法安装它。当我用 apt-key 做任何事情时,我得到: E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

我成功地从deb文件手动安装了 gnupg ,并手动接收了密钥,这提供了类似的错误消息:

# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
 
推荐文章
完美的消炎药  ·  地环学院学科地理研究生参加2022年浙师尖峰教育论坛
6 月前
爱看书的松鼠  ·  Solved: Content Filter vs L7 rules - The Meraki Community
8 月前
朝气蓬勃的李子  ·  博士研究生教育 | 上海纽约大学
11 月前
爱旅游的椅子  ·  2024华南师范大学选科要求对照表 各专业需要选考什么科目_大学生必备网
1 年前
老实的皮蛋  ·  保罗·安德鲁辞世:穿过戴高乐、浦东机场,追寻一种轻盈自在_艺术评论_澎湃新闻-The Paper
1 年前
今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
删除内容请联系邮箱 2879853325@qq.com
Code - 代码工具平台
© 2024 ~ 沪ICP备11025650号