我正在尝试更新我的 Kubuntu 22.04 LTS。出现以下错误:
7 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <[email protected]>
W: Failed to fetch https://dl.yarnpkg.com/debian/dists/stable/InRelease The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.
如何解决这个问题?我使用 完全删除了 yarn sudo apt-get purge --auto-remove yarn
,但似乎我必须编辑source
文件并删除所有指向 yarn 存储库的链接。如何摆脱系统中的无效签名?
有任何想法吗?
答案1
rm /etc/apt/sources.list.d/yarn.list
将解决缺少的依赖关系。
这仅在纱线先前从系统中移除的情况下才会起作用。
答案2
您可以尝试以下操作:
curl -sShttps://dl.yarnpkg.com/debian/pubkey.gpg| sudo apt-key 添加 -
答案3
或者使用密钥环来避免 apt-key 贬值问题(例如 Ubuntu 22.04):
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/yarn.gpg