I installed Ubuntu 12.04 on a machine at work, using the WUBI installer. When I did an update, it complained like this:
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com precise-security Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <email@example.com>
It turns out that i was not authorized on the WIFI when I tried to do the update, so of course it failed. The real issue is that it managed to mess up the APT cache, so it kept on failing, even after I had the WIFI running.
The fix, from Ubuntu Forums, was to clear that cache.
cd /var/lib/apt sudo mv lists lists.old sudo mkdir -p lists/partial sudo apt-get update