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

PHPz
Release: 2024-02-09 16:30:09
forward
770 people have browsed it

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
Copy after login
  • sudo apt-get update

  • sudo apt-get install migrate
    Copy after login

    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
    Copy after login

    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 -
    Copy after login

    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
    Copy after login

    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!

    source:stackoverflow.com
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!