当运行sudo apt update
时,出现以下错误:
Err:4 https://apt.releases.hashicorp.com focal InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AA16FCBCA621E701
我该怎么补救呢?
2条答案
按热度按时间owfi6suc1#
GPG密钥已过时或丢失。
运行此代码以删除过时的密钥
sudo rm /usr/share/keyrings/hashicorp-archive-keyring.gpg
并执行以下操作以获取当前密钥:
curl https://apt.releases.hashicorp.com/gpg | gpg --dearmor > /usr/share/keyrings/hashicorp-archive-keyring.gpg
我在root(
sudo -s
)下运行了最后一个,因为我不能让sudo和管道角色一起玩球。dw1jzc5e2#
删除
/etc/apt/sources.list.d/
下现有的Hashicorp文件,然后按照official guide: