admin管理员组文章数量:1592245
使用apt update时候报以下错误
MySQL APT 存储库:签名验证期间发生错误(公钥不可用)
MySQL为社区版本的MySQL 运行自己的包存储库。它们支持yum和apt包管理器,但之前的 GPG(用于签署包)已被替换。这会在运行apt-get update时导致错误:
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql/apt/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
W: Failed to fetch http://repo.mysql/apt/ubuntu/dists/focal/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
W: Some index files failed to download. They have been ignored, or old ones used instead.
查看存储库时,无法识别特定的 APT gpg 密钥。这些文件通常以 .gpg、.gnupg、.key 或类似的后缀结尾。在存储库的顶级目录中发现一个文件:RPM-GPG-KEY-mysql-2022
坑死了!
为什么坑爹?因为文件以 RPM 开头,大家肯定以为这个Key只用于 rpm 包(用于 yum 包管理器)
使用 apt-key 导入该文件:
curl -s http://repo.mysql/RPM-GPG-KEY-mysql-2022 | apt-key add -
好的 我们执行apt update
apt update
成功!
因此它是 GPG 密钥,所以它是有效的。虽然名字叫 RPM-GPG-KEY-mysql-2022 有点坑,但它确实是 MySQL APT 存储库的正确密钥
版权声明:本文标题:apt mysql 遇到 An error occurred during the signature verification 错误解决方法 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1726225278a1061440.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论