You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何解决apt更新时出现的NO_PUBKEY E88979FB9B30ACF2公钥缺失错误?

如何解决apt更新时出现的NO_PUBKEY E88979FB9B30ACF2公钥缺失错误?

看起来你在更新Dart官方仓库时碰到了公钥验证失败的问题,这是因为系统还没导入Dart仓库的官方验证密钥,apt没法确认仓库包的安全性,所以拒绝完成更新。别慌,按下面几步操作就能搞定:

步骤1:导入缺失的公钥

现在更推荐用密钥环文件的方式(替代已弃用的apt-key工具),执行以下命令:

# 从密钥服务器获取目标公钥
gpg --keyserver keyserver.ubuntu.com --recv-keys E88979FB9B30ACF2
# 将公钥导出到系统可信密钥目录
gpg --export E88979FB9B30ACF2 | sudo tee /usr/share/keyrings/dart.gpg > /dev/null

步骤2:确保仓库源配置关联密钥环

检查你的Dart仓库配置文件(一般在/etc/apt/sources.list.d/dart.list),确保内容包含signed-by参数指向刚才生成的密钥文件:

deb [signed-by=/usr/share/keyrings/dart.gpg] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main

如果原来的配置没有这个参数,直接编辑文件补上就行。

步骤3:重新执行更新操作

完成上面的设置后,再运行更新命令:

sudo apt update

要是你习惯用传统方式(虽然官方已不推荐),也可以直接执行:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E88979FB9B30ACF2
sudo apt update

这样就能解决公钥缺失的问题,正常更新Dart仓库了。


你遇到的完整错误信息如下:

Err:26 https://storage.googleapis.com/download.dartlang.org/linux/debian stable Release.gpg
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E88979FB9B30ACF2

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://storage.googleapis.com/download.dartlang.org/linux/debian stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E88979FB9B30ACF2

W: Failed to fetch https://storage.googleapis.com/download.dartlang.org/linux/debian/dists/stable/Release.gpg The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E88979FB9B30ACF2

W: Some index files failed to download. They have been ignored, or old ones used instead.

备注:内容来源于stack exchange,提问作者R A

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.20 07:35:33