简体   繁体   English

W:密钥存储在遗留的 trusted.gpg 密钥环 (/etc/apt/trusted.gpg) 中,有关详细信息,请参阅 apt-key(8) 中的弃用部分

[英]W: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details

I have installed gazebo on my ubuntu 22.04 LTS following the steps in https://classic.gazebosim.org/tutorials?tut=install_ubuntu via their alternative installation.我按照https://classic.gazebosim.org/tutorials?tut=install_ubuntu中的步骤通过他们的替代安装在我的 ubuntu 22.04 LTS 上安装了 gazebo。 I am getting the following error when I try to update the packages using sudo apt update当我尝试使用sudo apt update包时出现以下错误

W: http://packages.osrfoundation.org/gazebo/ubuntu-stable/dists/jammy/InRelease : Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. W: http://packages.osrfoundation.org/gazebo/ubuntu-stable/dists/jammy/InRelease :密钥存储在传统的 trusted.gpg 密钥环 (/etc/apt/trusted.gpg) 中,请参阅 apt 中的弃用部分-key(8) 了解详情。

I have tried deleting the key from apt-key list but it gave me additional warning about unable to very the key, since the public key was missing.我曾尝试from apt-key list删除密钥,但由于缺少公钥,它给了我关于无法验证密钥的额外警告。 Is there a way for fixing this warning?有没有办法解决这个警告?

I have referred the a similar solution at Warning: apt-key is deprecated.我在Warning: apt-key is deprecated 中提到了类似的解决方案。 Manage keyring files in trusted.gpg.d instead but couldn't solve the problem. 改为在 trusted.gpg.d 中管理密钥环文件,但无法解决问题。

cd /etc/apt

Followed by:其次是:

sudo cp trusted.gpg trusted.gpg.d

Now run a sudo apt update The error shouldn't be showing again现在运行 sudo apt update 错误不应该再次显示

You can convert your keys from the old apt-key tool to the new apt trusted keys format.您可以将您的密钥从旧的 apt-key 工具转换为新的 apt 可信密钥格式。

First, you should search for your key ID.首先,您应该搜索您的密钥 ID。

Try apt-key list gazebo , if only ones return, it will be easy.尝试apt-key list gazebo ,如果只有一个返回,那将很容易。 Simply run this command.只需运行此命令。

apt-key export gazebo | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/gazebo-key.gpg

and that warning will go away并且该警告将 go 消失

Additionally, you can specify the key file in the source definition.此外,您可以在源定义中指定密钥文件。 But by default, apt will check all valid keys.但默认情况下,apt 将检查所有有效密钥。

Check this site for an example查看此站点以获取示例

https://tecadmin.net/resolved-key-is-stored-in-legacy-trusted-gpg-keyring/ https://tecadmin.net/resolved-key-is-stored-in-legacy-trusted-gpg-keyring/

Recently, I have came across a blog post, which listed different methods to solve this issue in a more general approach.最近,我看到一篇博文,其中列出了以更通用的方式解决此问题的不同方法。 I have used the third one listed in here .我使用了这里列出的第三个。 The method is simple but a forceful one, but it worked for me.该方法简单但有力,但对我有用。 I would like to quote the words in the blog post我想引用博文中的话

It is a forceful method because we are not converting keys but instead directly moving legacy keys to a trusted folder, , it may be not a wise idea still if you are not finding any other quick way for your Legacy key hen here is the one to use:这是一种有效的方法,因为我们不是在转换密钥,而是直接将遗留密钥移动到受信任的文件夹,如果您没有找到任何其他快速的遗留密钥方法,那么这可能不是一个明智的主意,那么这里就是采用:

simple navigate to the key listing folder by using cd command and then use a cp command.使用cd命令简单导航到密钥列表文件夹,然后使用cp命令。 you can use the code snippet given below(taken from the blog post).您可以使用下面给出的代码片段(摘自博客文章)。

cd /etc/apt
sudo cp trusted.gpg trusted.gpg.d

Other possible solutions are also listed in the same and you can check those too!其他可能的解决方案也列在同一篇文章中,您也可以检查它们!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法通过 apt-key 添加 docker GPG 密钥 - Unable to add docker GPG key via apt-key Apt 在 Ubuntu 18.04 上拒绝`/etc/apt/trusted.gpg.d` 中的密钥环 - Apt rejects keyrings in `/etc/apt/trusted.gpg.d` on Ubuntu 18.04 使用 apt-key adv 下载和设置密钥服务器失败并显示 gpg:密钥服务器接收失败:一般错误 - Downloading and setting a keyserver with apt-key adv fails with gpg: keyserver receive failed: General error “curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -” 我们应该在这里添加一些密钥吗? - “curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -” are we supposed to add some key here? 无法成功构建 rocker/r-apt 映像 NO GPG KEY found - Unable to successfully build the rocker/r-apt image NO GPG KEY found gpg:“ tag:launchpad.net:2008:re​​dacted”不是关键ID:使用apt-get安装新软件包时跳过错误 - gpg: “tag:launchpad.net:2008:redacted” not a key ID: skipping error while installing new packages using apt-get Ubuntu 12.04 apt-get更新GPG错误 - Ubuntu 12.04 apt-get update GPG error 如何将gpg密钥链接到启动板 - How to link gpg key to launchpad "检索 gpg 密钥超时" - retrieving gpg key timed out gpg2导入gpg1密钥失败(gpg 2.1.15,Ubuntu 17.10) - gpg2 import of gpg1 secret key fails (gpg 2.1.15, Ubuntu 17.10)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM