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