User avatar
RichKavanagh
Posts: 31
Joined: Fri Aug 31, 2012 8:57 pm
Location: UK
Contact: Website

Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Dec 31, 2012 4:28 pm

Hi everyone :)

I'm new to this whole linux malarkey and I seem to have come across bit of a problem when trying to update my beloved Raspberry Pi.

Currently running:
Linux raspberrypi2 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012 armv6l GNU/Linux
I ran "sudo raspi-config" and hit the "update" option which reported an error "There was an error running do_update" so in order to perform an update I tried this from the command line:

Code: Select all

sudo apt-get update && sudo apt-get upgrade
(which I think is right??)

That then starts fetching things and reading packages and generally looks good until after a few minutes when I get the following error:
Get:1 http://archive.raspberrypi.org wheezy InRelease [7,737 B]
Get:2 http://mirrordirector.raspbian.org wheezy InRelease [12.5 kB]
Err http://archive.raspberrypi.org wheezy InRelease

Err http://mirrordirector.raspbian.org wheezy InRelease

Fetched 2 B in 0s (6 B/s)
Reading package lists... Error!
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.raspberrypi.org wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://mirrordirector.raspbian.org wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E

W: Failed to fetch http://mirrordirector.raspbian.org/rasp ... /InRelease

W: Failed to fetch http://archive.raspberrypi.org/debian/d ... /InRelease

W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Unable to synchronize mmap - msync (5: Input/output error)
E: Failed to truncate file - ftruncate (30: Read-only file system)
E: Problem renaming the file /var/cache/apt/pkgcache.bin.BU01D3 to /var/cache/apt/pkgcache.bin - rename (30: Read-only file system)
E: The package lists or status file could not be parsed or opened.
I'll admit I am at a complete loss as to what this even means, never mind how to fix it :)

Hopefully someone can help?

User avatar
joan
Posts: 15084
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Dec 31, 2012 6:48 pm

Could you try

sudo apt-get update

by itself?

What does it say?

User avatar
RichKavanagh
Posts: 31
Joined: Fri Aug 31, 2012 8:57 pm
Location: UK
Contact: Website

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Dec 31, 2012 7:09 pm

Hi there :)

So I did a "sudo apt-get update", alas it also failed.
Get:1 http://archive.raspberrypi.org wheezy InRelease [7,737 B]
Get:2 http://mirrordirector.raspbian.org wheezy InRelease [12.5 kB]
Err http://archive.raspberrypi.org wheezy InRelease

Err http://mirrordirector.raspbian.org wheezy InRelease

Fetched 20.2 kB in 0s (75.4 kB/s)
Reading package lists... Error!
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.raspberrypi.org wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://mirrordirector.raspbian.org wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E

W: Failed to fetch http://mirrordirector.raspbian.org/rasp ... /InRelease

W: Failed to fetch http://archive.raspberrypi.org/debian/d ... /InRelease

W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Read error - read (21: Is a directory)
E: Problem opening /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_contrib_binary-armhf_Packages
E: The package lists or status file could not be parsed or opened.
Does that help?? :)

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Dec 31, 2012 7:19 pm

I got the same error today. I had disk corruption and i was not able to recover from it. Will install again from scratch tomorrow.
Check if your dmesg shows corruption messages.

User avatar
RichKavanagh
Posts: 31
Joined: Fri Aug 31, 2012 8:57 pm
Location: UK
Contact: Website

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Dec 31, 2012 7:37 pm

Hi :)

I did a 'dmesg' and waded through the output, nothing is jumping out as me as being unusual or anything that might point towards the issue.

I'm glad in a way that it's not just me this is happening to - it eases my panic somewhat :)

Is there an equivalent of the old DOS 'chkdsk' command that I could try, just to rule that out?

User avatar
joan
Posts: 15084
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Dec 31, 2012 7:56 pm

As a one off try

sudo apt-get --allow-unauthenticated update

User avatar
RichKavanagh
Posts: 31
Joined: Fri Aug 31, 2012 8:57 pm
Location: UK
Contact: Website

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Dec 31, 2012 9:00 pm

Hi Joan.

I tried what you suggested, slightly different error (well, the end part anyway):
Get:1 http://mirrordirector.raspbian.org wheezy InRelease [12.5 kB]
Err http://mirrordirector.raspbian.org wheezy InRelease

Get:2 http://archive.raspberrypi.org wheezy InRelease [7,737 B]
Err http://archive.raspberrypi.org wheezy InRelease

Fetched 20.2 kB in 0s (28.2 kB/s)
Reading package lists... Error!
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://mirrordirector.raspbian.org wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.raspberrypi.org wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E

W: Failed to fetch http://mirrordirector.raspbian.org/rasp ... /InRelease

W: Failed to fetch http://archive.raspberrypi.org/debian/d ... /InRelease

W: Some index files failed to download. They have been ignored, or old ones used instead.
E: Read error - read (21: Is a directory)
E: Problem opening /var/lib/apt/lists/mirrordirector.raspbian.org_raspbian_dists_wheezy_contrib_binary-armhf_Packages
E: The package lists or status file could not be parsed or opened.
Not sure if that one helps or not :)

User avatar
joan
Posts: 15084
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Dec 31, 2012 9:37 pm

I think the problem is with the reposotries. I'd try again tomorrow.

User avatar
RichKavanagh
Posts: 31
Joined: Fri Aug 31, 2012 8:57 pm
Location: UK
Contact: Website

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Tue Jan 01, 2013 12:15 pm

I'm not so sure now...

I tried a "sudo apt-get update" on my older (rev1) Raspberry Pi and it updates fine:
pi@raspberrypi1 ~ $ sudo apt-get update
Get:1 http://mirrordirector.raspbian.org wheezy InRelease [12.5 kB]
Get:2 http://mirrordirector.raspbian.org wheezy/main armhf Packages [7,400 kB]
Hit http://archive.raspberrypi.org wheezy InRelease
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
(etc)
Tried again this morning on my main rev2 Pi and I get the same errors as per my first post:
pi@raspberrypi2 ~ $ sudo apt-get update
Get:1 http://archive.raspberrypi.org wheezy InRelease [7,737 B]
Get:2 http://mirrordirector.raspbian.org wheezy InRelease [12.5 kB]
Err http://archive.raspberrypi.org wheezy InRelease
Err http://mirrordirector.raspbian.org wheezy InRelease
I've just looked at the sources.list file and it's identical on both.

Any other suggestions welcomed, thanks everyone :)

User avatar
RichKavanagh
Posts: 31
Joined: Fri Aug 31, 2012 8:57 pm
Location: UK
Contact: Website

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Tue Jan 01, 2013 12:27 pm

Sort of getting somewhere... Slightly different error now.

I found and used the commands below, but I have no idea what it's actually done, perhaps someone could enlighten me?

Code: Select all

sudo apt-get clean
sudo mv /var/lib/apt/lists /tmp
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update
Which was taken from http://askubuntu.com/questions/131601/h ... tion-error

Now when I issue a "sudo apt-get update", I get the following (you'll notice the "Err" errors are now missing):
pi@raspberrypi2 ~ $ sudo apt-get update
Get:1 http://archive.raspberrypi.org wheezy InRelease [7,737 B]
Get:2 http://mirrordirector.raspbian.org wheezy InRelease [12.5 kB]
Ign http://archive.raspberrypi.org wheezy InRelease
Ign http://mirrordirector.raspbian.org wheezy InRelease
Get:3 http://mirrordirector.raspbian.org wheezy/main armhf Packages [7,400 kB]
Get:4 http://archive.raspberrypi.org wheezy/main armhf Packages [6,414 B]
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Get:5 http://mirrordirector.raspbian.org wheezy/contrib armhf Packages [23.3 kB]
Get:6 http://mirrordirector.raspbian.org wheezy/non-free armhf Packages [47.7 kB ]
Get:7 http://mirrordirector.raspbian.org wheezy/rpi armhf Packages [14 B]
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en
Fetched 7,497 kB in 56s (132 kB/s)
Reading package lists... Done
W: GPG error: http://archive.raspberrypi.org wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E
W: GPG error: http://mirrordirector.raspbian.org wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9165938D90FDDD2E
So it's just the "NO_PUBKEY" issue to resolve I think...

User avatar
RichKavanagh
Posts: 31
Joined: Fri Aug 31, 2012 8:57 pm
Location: UK
Contact: Website

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Tue Jan 01, 2013 12:29 pm

Oh, I also tried the following which was also on the same page:

Code: Select all

sudo gpg --keyserver hkp://subkeys.pgp.net --recv-keys 82B129927FA3303
But that gave me this error:
pi@raspberrypi2 ~ $ sudo gpg --keyserver hkp://subkeys.pgp.net --recv-keys 82B129927FA3303E
gpg: requesting key 7FA3303E from hkp server subkeys.pgp.net
gpgkeys: key 82B129927FA3303E not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Wed Jan 02, 2013 8:37 am

Yes, same issue.
I was able to recovert the other key (9165938D90FDDD2E) but failed similarly with the other as you.

Now recovering from backup. Very interesting that we run into this at the same time.

AddicusT
Posts: 11
Joined: Sat Dec 08, 2012 12:53 am

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Thu Jan 17, 2013 12:39 am

I am also having this problem. I think it comes from modifying sources.list.

glennmcco
Posts: 2
Joined: Thu Feb 21, 2013 5:14 pm

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Thu Feb 21, 2013 5:16 pm

I am also having this problem, has anyone found a solution?

User avatar
RichKavanagh
Posts: 31
Joined: Fri Aug 31, 2012 8:57 pm
Location: UK
Contact: Website

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Thu Feb 21, 2013 9:29 pm

No :(

Formatted, started again :(

mhossam
Posts: 1
Joined: Thu May 16, 2013 1:21 am

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Thu May 16, 2013 1:28 am

That solved the problem for me :)
wget http://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -

fengyue5bian
Posts: 1
Joined: Tue Dec 09, 2014 6:36 pm
Location: Cambridge

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Dec 15, 2014 12:42 pm

The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY

Error:

GPG error: http://ftp.us.debian.org wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY x0x0x0x0x0x0x0x0

Take note of the 16 digit key and place it into the following statement.

gpg --keyserver keys.gnupg.net --recv-key x0x0x0x0x0x0x0x0

gpg -a --export x0x0x0x0x0x0x0x0 | sudo apt-key add -


Problem solved! :D

Diane253
Posts: 7
Joined: Fri Aug 15, 2014 8:19 pm
Location: Pennsylvania, USA

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Fri Dec 19, 2014 7:14 am

After doing an update today I got the same error:
W: GPG error: http://nightly.openerp.com ./ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DEF2A2198183CBB5

I tried

Code: Select all

/$ gpg --keyserver keys.gnupg.net --recv-key DEF2A2198183CBB5
Resulting:
gpg: requesting key 8183CBB5 from hkp server keys.gnupg.net
gpgkeys: key DEF2A2198183CBB5 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

I tried:

Code: Select all

gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv DEF2A2198183CBB5
Resulting:
gpg: requesting key 8183CBB5 from hkp server keyserver.ubuntu.com
gpgkeys: key DEF2A2198183CBB5 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

I tried:

Code: Select all

gpg --keyserver subkeys.pgp.net --recv-keys DEF2A2198183CBB5
Resulting:
gpg: requesting key 8183CBB5 from hkp server subkeys.pgp.net
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error[/code]

I also tried:

Code: Select all

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com DEF2A2198183CBB5
And:

Code: Select all

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8BAF9A6F
I still come up with the same error after updating.
I have installed nothing new since last time that I updated.
I could use some help, please.

brbaker
Posts: 2
Joined: Fri Jan 08, 2016 4:42 am

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Fri Jan 08, 2016 4:56 am

This thread is old but was not resolved. I had the same issue today and found the solution here: viewtopic.php?f=91&t=114692&p=833262&hi ... EY#p833262

User avatar
IgorGanapolsky
Posts: 33
Joined: Sun Apr 10, 2016 8:32 pm

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Sun Nov 27, 2016 7:34 pm

I am also getting the following error now:
> GPG error: http://debian.yeasoft.net wheezy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40FC0CD26BF18B15

fred44nl
Posts: 292
Joined: Sat Jun 25, 2016 11:59 am
Location: Scharendijke, NL

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Tue Nov 29, 2016 9:28 pm

I have this error:

W: GPG error: https://dev2day.de jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 97BC9498DC9666A8

there are many suggestions, but none solves the problem.
headless RPi 3B running from usbhdd.

tracy
Posts: 1
Joined: Sat Apr 08, 2017 5:18 pm

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Sat Apr 08, 2017 5:29 pm

This was left out of the instructions it appears:

Code: Select all

wget -O - https://dev2day.de/pms/dev2day-pms.gpg.key | sudo apt-key add -

Paulwood
Posts: 51
Joined: Mon Nov 04, 2013 10:30 am

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Thu May 18, 2017 1:38 am

This is happening to me using 2017-04-10-raspbian-jessie-lite.img - when I do a 'sudo apt-get update' I get

Code: Select all

pi@aldenst:~ $ sudo apt-get update
Get:1 http://repo.mosquitto.org jessie InRelease [3,884 B]
Hit http://mirrordirector.raspbian.org jessie InRelease                                                      
Hit http://archive.raspberrypi.org jessie InRelease                               
Ign http://repo.mosquitto.org jessie InRelease                                    
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages        
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages     
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages                                                 
Hit http://archive.raspberrypi.org jessie/main armhf Packages                                                         
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages                    
Hit http://archive.raspberrypi.org jessie/ui armhf Packages                                                           
Hit http://repo.mosquitto.org jessie/main armhf Packages                                                              
Ign http://repo.mosquitto.org jessie/main Translation-en_US                                                           
Ign http://repo.mosquitto.org jessie/main Translation-en                                        
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_US                                                                                                      
Ign http://archive.raspberrypi.org jessie/main Translation-en_US                                                                                                             
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en                                                                                                         
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_US                                                                                                         
Ign http://archive.raspberrypi.org jessie/main Translation-en                                                                                                                
Ign http://mirrordirector.raspbian.org jessie/main Translation-en                                                                                                            
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_US                                                                                                     
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en                                                                                                        
Ign http://archive.raspberrypi.org jessie/ui Translation-en_US                                                                                                               
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_US                                                                                                          
Ign http://archive.raspberrypi.org jessie/ui Translation-en                                                                                                                  
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en                                                                                                             
Fetched 3,884 B in 29s (132 B/s)                                                                                                                                             
Reading package lists... Done
W: GPG error: http://repo.mosquitto.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 61611AE430993623
pi@aldenst:~ $ 
This is on a fresh install and just after the standard reboot to expand the disk.

Any solutions to this?

Gandolf_1
Posts: 3
Joined: Mon Jan 01, 2018 8:33 pm

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Jan 01, 2018 9:56 pm

I am having the same problem. I have tried all the above suggestion without success. I have three observations. First this problem did not occur until I loaded MONO. Second some of the suggestion in the above posts required the DIRMNGR which is not installed . Third when I used

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6A19B38D3D831E

The message was it was not a key ID

The orginal failure message when I tried an update was

pi@PI_2:~ $ sudo apt-get --allow-unauthenticated update
Get:1 http://download.mono-project.com/repo/debian raspbianstretch InRelease [2,224 B]
Hit:2 http://mirrordirector.raspbian.org/raspbian stretch InRelease
Hit:3 http://archive.raspberrypi.org/debian stretch InRelease
Ign:1 http://download.mono-project.com/repo/debian raspbianstretch InRelease
Fetched 2,224 B in 1s (1,590 B/s)
Reading package lists... Done
W: GPG error: http://download.mono-project.com/repo/debian raspbianstretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A6A19B38D3D831EF
W: The repository 'http://download.mono-project.com/repo/debian raspbianstretch InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.


Any suggested resolutions would be greatly appreciated.

User avatar
DougieLawson
Posts: 40138
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Trouble updating - GPG error? NO_PUBKEY? Err InRelease?

Mon Jan 01, 2018 10:17 pm

What on earth are you doing that for?

There's a perfectly serviceable version of mono-complete available as part of plain ordinary Raspbian Stretch.

Undo all the changes you've made to /etc/apt/sources.list and files in /etc/apt/sources.list.d before you destroy your Raspian installation.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Return to “Troubleshooting”