The following signatures were invalid [duplicate]

Possible Duplicate:
What is the easiest way to resolve apt-get BADSIG GPG errors?

I use ubuntu 11.10 latest update, but when I change the ubuntu update server to the main server i get this error:

sudo apt-get update
......
......

Hit http://archive.ubuntu.com oneiric-security/universe Translation-en
Fetched 198 B in 16s (11 B/s)
Reading package lists... Done
W: GPG error: http://archive.ubuntu.com oneiric-updates Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <[email protected]>

i tried many solutions from google but nothing helps. Any ideas?


Solution 1:

First of all try

sudo apt-get clean

sudo apt-get update && sudo apt-get upgrade

Some ISPs cache the packages and errors like these are reported then. If the above commands don't work, try

sudo apt-get update -o Acquire::http::No-Cache=True

and again

sudo apt-get update && sudo apt-get upgrade

If it still doesn't work,

sudo apt-get update -o Acquire::BrokenProxy=true 

sudo apt-get update && sudo apt-get upgrade

If all set, u can make it permanent, so that no problem in future persists by editing

/etc/apt/apt.conf

APT 
{
// Options for the downloading routines
  Acquire
  {
    http
    {
      No-Cache "true";
    };
  };
}