Whenever I am running "sudo apt-get update" command on my Ubuntu 12.04 box, I am getting this error:
Fetched 837 B in 0s (29.0 kB/s)
Reading package lists... Done
N: Ignoring 'build' in directory '/etc/apt/sources.list.d/' as it is not a regular file
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: precise Release: The following signatures were invalid: KEYEXPIRED 1468001658
W: Failed to fetch
W: Some index files failed to download. They have been ignored, or old ones used instead.I am not sure what is the issue and how can I fix it?
11 Answer
You have an expired repos in your /etc/apt/sources.list.d/ folder or the /etc/apt/sources.list file itself.
Open your favourite console, I like yakuake or konsole (default is gnome-terminal I think), and do
sudo grep "installsvc" -R /etc/apt/That will tell you where "installsvc" is referenced. In that file you want to instead link direct to the Puppet Labs repos. Delete part from the repos URL (eg gksudo gedit /etc/apt/$fileToChangeName and manually edit the file, remember to save it before closing the program).
You also appear to have a wrongly placed file, that's not doing any harm but is being "noticed" in the apt-get output.
sudo rm /etc/apt/sources.list.d/buildwould delete it (with no undelete), but you probably want to check it first to see if you want to keep it, mv and chown will probably be needed then.
You should also be aware that 12.04 Precise Pangolin is well out of date. Newer Ubuntus will use apt instead of apt-get but once you've fixed the issues you can:
sudo apt-get autoclean; sudo apt-get update; sudo apt-get dist-upgradeto do the latest available upgrades including any from the newly added Puppet Labs repos (the former repos was a mirror).