How to fix GPG errors in Ubuntu
Posted: 02.27.12 Filed under: Software Installation 11 CommentsProblem: When running sudo apt-get update, you get a bunch of errors such as
W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures
couldn't be verified because the public key is not available: NO_PUBKEY 6E871C4A881574DE
And because of this, you can’t run the update. There are a couple of fixes for this.
First, there’s the standard suite of commands:
sudo apt-get clean
sudo rm -r /var/lib/apt/lists/*
sudo touch /var/lib/apt/lists/lock
sudo mkdir /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update
If these don’t work you may need to manually re-download the keys.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys hex_key_here
Substituting the actually key for hex_key_here. The key is the long hexadecimal number at the end of the ap-get update error. Using the example I gave above, I would type into my terminal
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6E871C4A881574DE
AND do yourself a favor and copy/paste the keys and/or the commands rather than manually typing them. One error is all it takes to make a lot of frustration.
If this stuff doesn’t work, there may be more info here: http://ubuntuforums.org/showthread.php?t=1221323
Looks like this solved a problem I was having downloading the “lzma” package — thanks!
Thanks … Help me a lot!
brilliant. worked for me but only the last step.
thanks.
thanks,this solved my problem in 12.04
Thanks, it solved my problem.
Helped me too!
awesome, that worked for me. Back to editing images!
This worked great for me, thank you
Thanks a ton, those set of codes worked for me…this was extremly helpful…..
I love you!!!!!! Thanks!
Thank you…..)