本文最后更新于 2023-08-12,文章内容可能已经过时。

解决sudo apt-get update报错问题

输入sudo apt update出现如下报错

W: GPG error: https://packages.microsoft.com/repos/edge stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
E: The repository 'https://packages.microsoft.com/repos/edge stable 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.

Screenshot from 2021-12-16 00-10-09.png 原因是没有将edge的公钥导入到Ubuntu服务器 使用如下命令导入

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB3E94ADBE1229CF

Screenshot from 2021-12-16 00-10-44.png 最后重新执行sudo apt update正常更新