Home  >  Article  >  Backend Development  >  Golang migration installation fails on Ubuntu 22.04 with the following GPG error: Public key not available: NO_PUBKEY B53DC80D13EDEF05

Golang migration installation fails on Ubuntu 22.04 with the following GPG error: Public key not available: NO_PUBKEY B53DC80D13EDEF05

PHPz
PHPzforward
2024-02-09 16:30:09826browse

Golang 迁移安装在 Ubuntu 22.04 上失败,并出现以下 GPG 错误:公钥不可用:NO_PUBKEY B53DC80D13EDEF05

php editor Baicao encountered problems when installing Golang on Ubuntu 22.04. A GPG error occurred during the installation process, reporting that the public key was unavailable. The specific error message was: NO_PUBKEY B53DC80D13EDEF05. This error caused the migration installation to fail, causing trouble to users. Next, we will discuss how to solve this problem to successfully install Golang on Ubuntu 22.04.

Question content

I try to install golang migrate on ubutu 22.4 but I get the following error when trying to execute the command.

Error Public key is not available: no_pubkey b53dc80d13edef05

This is what I have tried so far, it throws a "Public key not found" message when trying to execute the second command - sudo-apt-get update.

1.

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

sudo apt-get install migrate

I tried adding the key manually using the following command but it still shows the same error when executing sudo apt-get update.

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

The above 3 commands run well on ubuntu 20.4, but not on 22.4. Any clues or solutions would be very helpful.

Solution

Yes, it's nice to find a solution even after so many trial and error methods, a simple one line command line script has solved the problem,

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

After doing this, I installed go migrate using the following command.

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

    
    
sudo apt-get install migrate

The above is the detailed content of Golang migration installation fails on Ubuntu 22.04 with the following GPG error: Public key not available: NO_PUBKEY B53DC80D13EDEF05. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete