我是靠谱客的博主 拼搏蜜蜂,最近开发中收集的这篇文章主要介绍Docker apt-get update报错,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

在Docker改apt源出现问题

root@1ad3e492d821:/etc/apt# apt-get update
Ign:1 http://mirrors.163.com/debian stretch InReleaseGet:2 http://mirrors.163.com/debian stretch-updates InRelease [93.6 kB]
Get:3 http://mirrors.163.com/debian-security stretch/updates InRelease [53.0 kB]
Get:4 http://mirrors.163.com/debian stretch Release [118 kB]
Err:2 http://mirrors.163.com/debian stretch-updates InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138
Get:5 http://mirrors.163.com/debian stretch Release.gpg [3177 B]
Err:3 http://mirrors.163.com/debian-security stretch/updates InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA8E81B4331F7F50 NO_PUBKEY 112695A0E562B32A
Ign:5 http://mirrors.163.com/debian stretch Release.gpg
Ign:6 http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 InRelease
Hit:7 http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 Release
Reading package lists... Done
W: GPG error: http://mirrors.163.com/debian stretch-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138
E: The repository 'http://mirrors.163.com/debian stretch-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://mirrors.163.com/debian-security stretch/updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA8E81B4331F7F50 NO_PUBKEY 112695A0E562B32A
E: The repository 'http://mirrors.163.com/debian-security stretch/updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://mirrors.163.com/debian stretch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY EF0F382A1A7B6500
E: The repository 'http://mirrors.163.com/debian stretch Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys + 上面出现的公钥

如:apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138 AA8E81B4331F7F50 112695A0E562B32A

成功

root@1ad3e492d821:/etc/apt# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138 AA8E81B4331F7F50 112695A0E562B32A
Executing: /tmp/apt-key-gpghome.SrkDSou6uj/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138 AA8E81B4331F7F50 112695A0E562B32A
gpg: key 4DFAB270CAA96DFA: public key "Debian Security Archive Automatic Signing Key (10/buster) <ftpmaster@debian.org>" imported
gpg: key EDA0D2388AE22BA9: public key "Debian Security Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>" imported
gpg: key DC30D7C23CBBABEE: public key "Debian Archive Automatic Signing Key (10/buster) <ftpmaster@debian.org>" imported
gpg: key E0B11894F66AEC98: public key "Debian Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>" imported
gpg: Total number processed: 4
gpg:
imported: 4
root@1ad3e492d821:/etc/apt# apt-get update
Ign:1 http://mirrors.163.com/debian stretch InRelease
Get:2 http://mirrors.163.com/debian stretch-updates InRelease [93.6 kB]
Get:3 http://mirrors.163.com/debian-security stretch/updates InRelease [53.0 kB]
Get:4 http://mirrors.163.com/debian stretch Release [118 kB]
Get:5 http://mirrors.163.com/debian stretch Release.gpg [3177 B]
Get:6 http://mirrors.163.com/debian-security stretch/updates/contrib amd64 Packages [1756 B]
Get:7 http://mirrors.163.com/debian-security stretch/updates/main amd64 Packages [969 kB]
Get:8 http://mirrors.163.com/debian-security stretch/updates/non-free amd64 Packages [6334 B]
Get:9 http://mirrors.163.com/debian stretch/main amd64 Packages [9610 kB]
Ign:10 http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 InRelease
Hit:11 http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 Release
Get:12 http://mirrors.163.com/debian stretch/non-free amd64 Packages [94.8 kB]
Get:13 http://mirrors.163.com/debian stretch/contrib amd64 Packages [61.1 kB]
Fetched 11.0 MB in 13s (823 kB/s)
Reading package lists... Done

最后

以上就是拼搏蜜蜂为你收集整理的Docker apt-get update报错的全部内容,希望文章能够帮你解决Docker apt-get update报错所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(64)

评论列表共有 0 条评论

立即
投稿
返回
顶部