ubuntu apt中www.example.com没有PUBKEYapt.releases.hashicorp.com

gudnpqoy  于 2023-02-07  发布在  其他
关注(0)|答案(2)|浏览(162)

当运行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

我该怎么补救呢?

owfi6suc

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和管道角色一起玩球。

dw1jzc5e

dw1jzc5e2#

删除/etc/apt/sources.list.d/下现有的Hashicorp文件,然后按照official guide

wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list

sudo apt update

相关问题