Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I wanted to install LAMP, but didn't install it properly somehow. So trying to remove previous package, I used purge. A large number of package got uninstalled like software centre etc.

When I rebooted my system it was unable to login to my desktop. Something like running in low graphic mode appeared. I installed GNOME desktop. I was able to login to GNOME desktop then, but there was no end to my problem after that.

I am unable to update now and several package are getting installed with errors.

W: GPG error: "http://dl.google.com" stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A040830F7FAC5991
W: GPG error: "http://archive.canonical.com" precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: "http://archive.getdeb.net" precise-getdeb Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A8A515F046D7E7CF
W: GPG error: "http://in.archive.ubuntu.com" precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: "http://in.archive.ubuntu.com" precise-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: "http://in.archive.ubuntu.com" precise-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: "http://in.archive.ubuntu.com" precise-proposed Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: "http://in.archive.ubuntu.com" precise-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 437D05B5 3E5C1192
sudo apt-get update

result of my cat /etc/apt/sources.list query are as follows:

# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release i386 (20120423)]/ precise main restricted

# See "http://help.ubuntu.com/community/UpgradeNotes" for how to upgrade to
# newer versions of the distribution.
deb "http://in.archive.ubuntu.com/ubuntu/" precise main restricted
deb-src "http://in.archive.ubuntu.com/ubuntu/" precise main restricted

## Major bug fix updates produced after the final release of the
## distribution.

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb "http://in.archive.ubuntu.com/ubuntu/" precise universe
deb-src "http://in.archive.ubuntu.com/ubuntu/" precise universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb "http://in.archive.ubuntu.com/ubuntu/" precise multiverse
deb-src "http://in.archive.ubuntu.com/ubuntu/" precise multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.

deb "http://in.archive.ubuntu.com/ubuntu/" precise-security main restricted
deb-src "http://in.archive.ubuntu.com/ubuntu/" precise-security main restricted
deb "http://in.archive.ubuntu.com/ubuntu/" precise-security universe
deb-src "http://in.archive.ubuntu.com/ubuntu/" precise-security universe
deb "http://in.archive.ubuntu.com/ubuntu/" precise-security multiverse
deb-src "http://in.archive.ubuntu.com/ubuntu/" precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb-src "http://archive.canonical.com/ubuntu" precise partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb "http://extras.ubuntu.com/ubuntu" precise main
deb-src "http://extras.ubuntu.com/ubuntu" precise main
deb "http://in.archive.ubuntu.com/ubuntu/" precise-updates restricted main multiverse universe
deb "http://in.archive.ubuntu.com/ubuntu/" precise-proposed restricted main multiverse universe
deb "http://in.archive.ubuntu.com/ubuntu/" precise-backports restricted main multiverse universe

I think some core components of my system have been reduced.

share|improve this question
    
Your question is really unclear. I have tried to fix the formatting some (it needs to be approved yet, but still). What is the "apt get " command doing in the middle? Is that what you executed to get the error that is above there? If so, you might want to specify that, or else specify why you did that and what the result was. Also I'm not sure what you mean with that last sentence. Did you try and look for an answer with that error by the way? (The following signatures couldn't be verified because the public key is not available) –  Nanne Nov 12 '12 at 10:09
    
sorry my question is unorganised.. i ma trying my best to explain the question.. while using command sudo apt-get update following error happened which is as in box 1.as shown above it was showing following keys are not verified. i looked for solution in this site..and got something like and sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys *. i have realised now that the problem is much bigger so the last line in the questions.. as i am unable to install several other software also.. –  abhishek_rathaur Nov 13 '12 at 17:54

1 Answer 1

Don't know how your keys got uninstalled or broken (or what else may be messed up), but putting them back is just grunt work.

If the steps below don't fix it, you may have to do a clean install.

In hindsight, it's always good to make backups of your system before you install anything big or upgrade, so that if things go south, you can just restore your backup without having to configure anything. Check out partimage, dump/restore, and good old tar.

This sort of thing often happens when you add new software sources.

Easy way: Use sudo apt-add-repository to add new repositories in the first place. It will automatically get and install the gpg keys for you.

or use y-ppa-manager (if the repository is a ppa).

The hard way: (the way I usually do it ;) ) Google each "NO_PUBKEY 40976EAF437D05B5" (where the number changes with each key that was missing - and the quotes help).

That will lead you quickly to people who have encountered the same problem and (hopefully) solved it. There will often be code right in the web pages that you can copy and paste into a terminal to get and install the key.

When Googling, it sometimes helps to use Search Tools->Any Time->Past Year to get just the more recent results so you don't get outdated instructions.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.