首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GPG错误:执行apt键的未知错误

GPG错误:执行apt键的未知错误
EN

Ask Ubuntu用户
提问于 2021-03-19 00:19:32
回答 2查看 4.1K关注 0票数 3

先给点背景..。

在Raspberry 4上安装了Ubuntu20.04.2LTS(GNU/Linux5.4.0-1029-raspi aarch64)。(这不是一个码头容器)。首先要确保现场和系统时钟的设置正确。从apt那里得到了最新的消息。通过在线脚本安装PiHole和PiVPN。确保无人值守-升级被正确地设置为只是安全更新。几个星期以来,一切都很完美。

今天,我随机地去检查了PiHole网络管理员,发现了一个500个内部服务器错误。SSH进入RPi,只是打算尝试重新启动,但决定先运行apt并查找更新。现在,我们都了解了,下面是我使用的命令,然后是它们的输出。任何帮助都将不胜感激。只有我能找到的东西是特定于码头集装箱和另外一个帖子,这似乎是几乎相同的问题,但从来没有得到任何人的一个答复。希望我没那么倒霉。

注意:为了避免看起来像垃圾邮件,我用< URL >替换了所有URL。它们最初都是http://ports.ubuntu.com/ubuntu-ports

代码语言:javascript
复制
sudo apt update

Hit:1 <URL> focal InRelease
Get:2 <URL> focal-updates InRelease [114 kB]
Err:1 <URL> focal InRelease
  Unknown error executing apt-key
Get:3 <URL> focal-backports InRelease [101 kB]
Err:2 <URL> focal-updates InRelease
  Unknown error executing apt-key
Get:4 <URL> focal-security InRelease [109 kB]
Err:3 <URL> focal-backports InRelease
  Unknown error executing apt-key
Err:4 <URL> focal-security InRelease
  Unknown error executing apt-key
Fetched 324 kB in 1s (221 kB/s)
Reading package lists... Error!
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: <URL> focal InRelease: Unknown error executing apt-key
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: <URL> focal-updates InRelease: Unknown error executing apt-key
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: <URL> focal-backports InRelease: Unknown error executing apt-key
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: <URL> focal-security InRelease: Unknown error executing apt-key
W: Failed to fetch <URL>/dists/focal/InRelease  Unknown error executing apt-key
W: Failed to fetch <URL>/dists/focal-updates/InRelease  Unknown error executing apt-key
W: Failed to fetch <URL>/dists/focal-backports/InRelease  Unknown error executing apt-key
W: Failed to fetch <URL>/dists/focal-security/InRelease  Unknown error executing apt-key
W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/ports.ubuntu.com_ubuntu-ports_dists_focal_universe_i18n_Translation-en
E: The package lists or status file could not be parsed or opened.

sudo apt clean
sudo apt-get clean
sudo mv /var/lib/apt/lists /tmp
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt clean
sudo apt update

Get:1 <URL> focal InRelease [265 kB]
Get:2 <URL> focal-updates InRelease [114 kB]
Get:3 <URL> focal-backports InRelease [101 kB]
Err:1 <URL> focal InRelease
  Unknown error executing apt-key
Get:4 <URL> focal-security InRelease [109 kB]
Err:2 <URL> focal-updates InRelease
  Unknown error executing apt-key
Err:3 <URL> focal-backports InRelease
  Unknown error executing apt-key
Err:4 <URL> focal-security InRelease
  Unknown error executing apt-key
Reading package lists... Done
W: GPG error: <URL> focal InRelease: Unknown error executing apt-key
E: The repository '<URL> focal 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: <URL> focal-updates InRelease: Unknown error executing apt-key
E: The repository '<URL> focal-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: <URL> focal-backports InRelease: Unknown error executing apt-key
E: The repository '<URL> focal-backports 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: <URL> focal-security InRelease: Unknown error executing apt-key
E: The repository '<URL> focal-security 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.
EN

回答 2

Ask Ubuntu用户

发布于 2022-02-12 15:14:39

在我的例子中,cat文件被销毁了。当恢复cat时,apt也变得正常。

票数 0
EN

Ask Ubuntu用户

发布于 2022-11-04 02:51:57

试试sudo ldconfig /usr/bin/gpg。请参阅:https://unix.stackexchange.com/a/677711/114401

对我起作用了。sudo apt update现在又开始工作了。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1324557

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档