Close Menu
    Facebook X (Twitter) Instagram
    • Articles
    • How it Works
    • Our Story
    • Contact Us
    Facebook X (Twitter) Instagram Pinterest Vimeo
    IT Beginner
    • Home
    • Blog
      • Happiness
      • Productivity
      • Leadership
    • About us
    • Contact us
    IT Beginner
    Ubuntu

    How to fix GPG error NO_PUBKEY in Ubuntu

    25/07/2017No Comments2 Mins Read

    I have a VPS for testing/developing, when I try Ubuntu 14.04 template for openvz, I got GPG error NO_PUBKEY when I run apt-get update or install whatever package. I guess because the Ubuntu 14.04 openvz template the provider use is missing public key for Ubuntu 14.04 trusty’s repository. I tried y-ppa-manager program to import all missing GPG keys but no luck.

    W: GPG error: http://archive.canonical.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
    
    W: GPG error: http://security.ubuntu.com trusty-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
    
    W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
    
    W: GPG error: http://archive.ubuntu.com trusty-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32

    I found a way to solve GPG error NO_PUBKEY error, all we need to do is to download the missing key using the hexadecimal numbers given in the error with apt-key (APT key management utility) command. In my case the hexadecimal number is 40976EAF437D05B5 and 3B4FE6ACC0B21F32. After running apt-key to download the missing PUBKEY, packages from that repositories will be considered trusted and you won’t NO_PUBKEY again.

    So let’s do it (your missing PUBKEY may be different so use the hexadecimal number given from your error)

    $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5

    and the output

    Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.RjvPYT2oIP --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
    
    gpg: requesting key 437D05B5 from hkp server keyserver.ubuntu.com
    
    gpg: key 437D05B5: public key "Ubuntu Archive Automatic Signing Key " imported
    
    gpg: Total number processed: 1
    
    gpg:               imported: 1
    $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
    and the output
    Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.1LP43k8aGL --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
    
    gpg: requesting key C0B21F32 from hkp server keyserver.ubuntu.com
    
    gpg: key C0B21F32: public key "Ubuntu Archive Automatic Signing Key (2012) " imported
    
    gpg: Total number processed: 1
    
    gpg:               imported: 1  (RSA: 1)
    Now run apt-get update again or install any package, you should not see any error asking for missing PUBKEY.
    apt-key NO_PUBKEY
    Previous ArticleHow to remove PHP X-Powered-By & Nginx Version
    Next Article How to install gui to centos minimal

    Related Posts

    Ubuntu

    How to install VNC Server on Ubuntu 15.10

    27/07/2017
    Server

    How to install VNC Server on Ubuntu 14.04

    25/07/2017
    Ubuntu

    Get ready for Ubuntu 14.04 LTS (Trusty Tahr)

    25/07/2017
    Subscribe
    Notify of
    guest

    guest

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    0 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments
    • Productivity
    • Leadership

    No posts

    No posts

    Subscribe to Newsletter
    Our Socials
    • Instagram
    • Facebook
    • Twitter
    • YouTube
    • LinkedIn

    Archives

    • April 2025
    • May 2024
    • March 2023
    • July 2022
    • March 2022
    • July 2020
    • January 2019
    • August 2018
    • July 2018
    • August 2017
    • July 2017
    • September 2016

    Categories

    • Business
    • CCNA 1 Instructor Materials
    • CentOS
    • Database
    • Debian
    • Fedora
    • Firefox
    • Happiness
    • Hardware
    • ICND1 Labs
    • ICND2 Labs
    • Leadership
    • Linux Essentials
    • Linux Mint
    • Marketing
    • My SQL
    • Netflix
    • Networking
    • Productivity
    • Resources
    • Security
    • SEO
    • Server
    • Social Media
    • Software
    • Tips – Tricks
    • Ubuntu
    • Uncategorized
    • User Experience
    • WordPress
    • Xubuntu

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna accumsan in scelerisque.

    Facebook X (Twitter) Instagram Pinterest

    Type above and press Enter to search. Press Esc to cancel.

    wpDiscuz