Golang migrate installation failing on Ubuntu 22.04 with the following GPG error public key is not available: NO_PUBKEY B53DC80D13EDEF05

huangapple go评论93阅读模式
英文:

Golang migrate installation failing on Ubuntu 22.04 with the following GPG error public key is not available: NO_PUBKEY B53DC80D13EDEF05

问题

我正在尝试在Ubuntu 22.4上安装Golang Migrate,但在执行命令时遇到以下错误。

错误:公钥不可用:NO_PUBKEY B53DC80D13EDEF05

我已经尝试了以下方法,但在执行第二个命令sudo apt-get update时,它会显示公钥未找到的消息。

curl -s https://packagecloud.io/install/repositories/golang-migrate/migrate/script.deb.sh | sudo bash
sudo apt-get update
sudo apt-get install migrate

我尝试使用以下命令手动添加密钥,但在执行sudo apt-get update时仍然显示相同的错误。

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

上述三个命令在Ubuntu 20.4上运行正常,但在22.4上不行。任何线索或解决方案将非常有帮助。

英文:

I am trying to install Golang Migrate on Ubutu 22.4 and I get the following error while trying to execute the commands.

Error public key is not available: NO_PUBKEY B53DC80D13EDEF05

This is what I have tried so far, and it throws the Public Key not found message while trying to execute the 2nd command - sudo-apt-get update.

curl -s https://packagecloud.io/install/repositories/golang-migrate/migrate/script.deb.sh | sudo bash
sudo apt-get update

3.

sudo apt-get install migrate

I have tried to add the keys manually using the following command but still its showing the same error while executing sudo apt-get update.

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

The above 3 commands works fine on Ubuntu 20.4 but not on 22.4. Any leads or solutions will be highly helpful.

答案1

得分: 7

是的,找到解决方案后感到非常高兴,尽管经过了许多试错方法,一个简单的一行命令脚本解决了这个问题,

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

执行此命令后,我使用以下命令安装了Go Migrate。

curl -s https://packagecloud.io/install/repositories/golang-migrate/migrate/script.deb.sh | sudo bash


sudo apt-get update


sudo apt-get install migrate
英文:

Yes its a great pleasure to find the solution even after so many trial and error methods, a simple one liner command line script has resolved the issue,

curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

After Executing this I have installed Go Migrate using the following commands.

curl -s https://packagecloud.io/install/repositories/golang-migrate/migrate/script.deb.sh | sudo bash


sudo apt-get update


sudo apt-get install migrate

huangapple
  • 本文由 发表于 2023年2月28日 22:24:12
  • 转载请务必保留本文链接:https://go.coder-hub.com/75593328.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定