学无先后,达者为师

网站首页 编程语言 正文

following signatures couldn‘t be verified because the public key is not available:NO_PUBKEY 467B942D

作者:jack@london 更新时间: 2022-04-11 编程语言

Ubuntu安装mysql8.0时,系统提示如下

sudo apt-get update
Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://azure.archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:5 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease
Get:6 http://repo.mysql.com/apt/ubuntu bionic InRelease [20.0 kB]
Err:6 http://repo.mysql.com/apt/ubuntu bionic InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
Reading package lists... Done
W: GPG error: http://repo.mysql.com/apt/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29
E: The repository 'http://repo.mysql.com/apt/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

则执行

sudo gpg --keyserver keyserver.ubuntu.com --recv 467B942D3A79BD29
gpg: WARNING: unsafe ownership on homedir '/home/test20/.gnupg'
gpg: keybox '/home/test20/.gnupg/pubring.kbx' created
gpg: /home/test20/.gnupg/trustdb.gpg: trustdb created
gpg: key 467B942D3A79BD29: public key "MySQL Release Engineering " imported
gpg: Total number processed: 1
gpg:               imported: 1

再执行

sudo gpg --export --armor 467B942D3A79BD29 | sudo apt-key add -
gpg: WARNING: unsafe ownership on homedir '/home/test20/.gnupg'
OK

再重新 sudo apt-get update 即可。

原文链接:https://blog.csdn.net/figosoar/article/details/123738533

栏目分类
最近更新