[Share Experiences] apt 提示 key is stored in legacy trusted.gpg keyring 的解决方法
Tofloor
poster avatar
deepin-superuser
deepin
2022-07-25 17:31
Author

使用 better-dde 后,apt update 时提示

W: http://120.132.17.134:3000/better-dde/ppa/raw/branch/master/./InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

原因是之前使用 apt-key 添加 key 的方式已经过时,需要将 key 放到 /etc/apt/trusted.gpg.d/ 中。better-dde 升级了 apt 版本,apt 给出这个警告。

截图_deepin-terminal_20220725090545.png

这只是个警告,放着不管就可以,如果实在不想看到,解决方法也很简单:重新添加一遍 key 即可。例如我这里报的 4 个 warning,修复命令如下:

wget -q -O - http://120.132.17.134:3000/better-dde/ppa/raw/branch/master/better-dde.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/better-dde-keyring.gpg
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/google-keyring.gpg
wget -q -O - https://mirrors.cloud.tencent.com/docker-ce/linux/debian/gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/docker-keyring.gpg
wget -q -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft-keyring.gpg

截图_deepin-terminal_20220725092034.png

Reply Favorite View the author
All Replies
ice
Moderator
2022-07-26 06:27
#1

agree

Reply View the author