How to fix apt-get GPG error No_pubkey Ubuntu 14

Source: Internet
Author: User
Tags gpg

This morning if I do apt-get update on my new Ubuntu 14.04 server, I got these error messages:

Reading Package Lists ... Done W:GPG error:http://security.ubuntu.com trusty-security release:the following signatures couldn ' t be verified Becau Se the public key was not available:no_pubkey 40976eaf437d05b5 no_pubkey 3b4fe6acc0b21f32 w:gpg Error:http://archive.can Onical.com Trusty release:the following signatures couldn ' t be verified because the public key was not Available:no_pubke Y 40976eaf437d05b5 no_pubkey 3b4fe6acc0b21f32 w:gpg error:http://archive.ubuntu.com trusty release:the following Signat Ures couldn ' t be verified because the public key was 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 P Ublic key is not available:no_pubkey 40976eaf437d05b5 no_pubkey 3b4fe6acc0b21f32

After do some small on Google, I found A-overcome this GPG no_pubkey error by downloading the missing key Using Apt-key tools. The command is as follow:

1 Apt-key adv--keyserver keyserver.ubuntu.com--recv-keys 40976eaf437d05b5

Command Result:

12345 EXECUTING:GPG--ignore-time-conflict--no-options--no-default-keyring--homedir/tmp/tmp.nbl6qnutxi-- No-auto-check-trustdb--trust-model always--keyring/etc/apt/trusted.gpg--primary-keyring/etc/apt/trusted.gpg-- keyserver keyserver.ubuntu.com--recv-keys 40976eaf437d05b5gpg:requesting key 437d05b5 from HKP server Keyserver.ubuntu . Comgpg:key 437d05b5:public Key "Ubuntu Archive Automatic Signing key <[email protected]>" Importedgpg:total numb ER processed:1gpg:imported:1

Second command:

1 Apt-key adv--keyserver keyserver.ubuntu.com--recv-keys 3b4fe6acc0b21f32

Result:

12345 EXECUTING:GPG--ignore-time-conflict--no-options--no-default-keyring--homedir/tmp/tmp.scmj2lly0s-- No-auto-check-trustdb--trust-model always--keyring/etc/apt/trusted.gpg--primary-keyring/etc/apt/trusted.gpg-- keyserver keyserver.ubuntu.com--recv-keys 3b4fe6acc0b21f32gpg:requesting key c0b21f32 from HKP server Keyserver.ubuntu . Comgpg:key c0b21f32:public Key "Ubuntu Archive Automatic Signing key () <[email protected]>" Importedgpg:tot Al number Processed:1gpg:imported:1 (rsa:1)

Notice that code 40976EAF437D05B5 and 3B4FE6ACC0B21F32 is taken from the error messages above.

Now the can do apt-get update again and you should has no error anymore.

How to fix apt-get GPG error No_pubkey Ubuntu 14

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.