首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用时出错: ubuntu 22.04上的sudo apt更新

使用时出错: ubuntu 22.04上的sudo apt更新
EN

Unix & Linux用户
提问于 2022-07-26 01:01:53
回答 2查看 7.8K关注 0票数 1

当我在ubuntu22.04上的终端上运行:sudo apt update时,我得到了这个错误

代码语言:javascript
运行
复制
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://download.opensuse.org/repositories/home:/Provessor/xUbuntu_20.04  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 876292BF7F9C32BF
W: http://download.mono-project.com/repo/ubuntu/dists/trusty/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: Failed to fetch http://download.opensuse.org/repositories/home:/Provessor/xUbuntu_20.04/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 876292BF7F9C32BF
W: Some index files failed to download. They have been ignored, or old ones used instead.

我尝试用以下命令解决问题:sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 876292BF7F9C32BF,但它不起作用,并得到了以下消息

代码语言:javascript
运行
复制
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.fbmSbmsKSu/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 876292BF7F9C32BF
gpg: keyserver receive failed: No data

单击此处获取更多详细信息:https://i.stack.imgur.com/sehEd.png

请帮帮我:

EN

回答 2

Unix & Linux用户

发布于 2022-07-29 18:20:38

我用这些东西解决了我的问题

代码语言:javascript
运行
复制
sudo rm -rf /var/lib/apt/lists/*
sudo rm -rf /etc/apt/sources.list.d/*
sudo apt-get update

:)

票数 1
EN

Unix & Linux用户

发布于 2022-07-28 17:04:45

这个方法是已弃用 for 安全关切:它允许您添加的任何签名密钥都可以签名任何包,而不仅仅是签名密钥存储库中的包。

更安全的方法是将密钥添加到像/usr/share/keyrings/repository-name.gpg这样的位置,然后从您的sources.list文件中引用它。

代码语言:javascript
运行
复制
deb [signed-by=/usr/share/keyrings/some-repo.gpg] http://some.repo/apt dev main

了解有关这个sources.list文件格式的更多信息,或查看添加Xpra键和存储库的这个例子

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

https://unix.stackexchange.com/questions/711267

复制
相关文章

相似问题

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