3

Before marking this as duplicate, please read the whole question. I've tried all the suggestions in all the related questions I could find, without any success.

I get errors about missing keys for all repos when doing sudo apt update. Running Ubuntu 16.04 LTS.

Get:14 url xenial InRelease [4 731 B]
Err:14 url InRelease
  The following signatures couldn't be verified because
  the public key is not available: NO_PUBKEY KEY

Deleting and adding the keys manually has no effect at all.

sudo apt-key adv --keyserver keyserver.ubuntu.com KEY1 KEY2 ...

Another related problem that I see is that the Software and Updates app has no entries in the Authentication tab. Which leads me to believe it's an issue related to permissions.

enter image description here

I've checked permissions and compared with what I see is normal online, but can't see anything wrong.

drw-rw-r--   7 root root  4096 mars  28 09:01 .
drwxr-xr-x 158 root root 12288 mars  28 09:08 ..
drwxr-xr-x   2 root root  4096 mars  28 09:08 apt.conf.d
drwxr-xr-x   2 root root  4096 okt.   5  2015 preferences.d
-rw-r--r--   1 root root   653 feb.   7 11:22 sources.list
-rw-rw-r--   1 root root  3100 okt.  12 09:57 sources.list.bak
drw-r--r--   2 root root  4096 feb.   7 11:23 sources.list.d
drw-r--r--   2 root root  4096 feb.   1 09:55 sources.list.d.bak
-rw-rw-r--   1 root root  2902 april 22  2016 sources.list.distUpgrade
-rw-rw-r--   1 root root   653 feb.   7 11:22 sources.list.save
-rw-r--r--   1 root root 29811 mars  28 09:01 trusted.gpg
-rw-r--r--   1 root root 28668 mars  28 09:01 trusted.gpg~
drwxr-xr-x   2 root root  4096 feb.   7 11:22 trusted.gpg.d

I'm stuck now, so any suggestions apart from reinstalling Ubuntu from scratch will be highly appreciated :)

5
  • can you try sudo chmod 644 sources.list?
    – Yaron
    Mar 28, 2017 at 7:32
  • @Yaron, tried that now, but no change, unfortunately. Still wrong key on all repos. Adding the reported missing keys gives an "unchange count" of the same as keys _I try to update. They are there, but apt just cant use them when fetching updates.
    – psv
    Apr 5, 2017 at 13:27
  • did you get key-id after the message * the public key is not available: NO_PUBKEY KEY*?
    – Yaron
    Apr 5, 2017 at 13:34
  • can you please confirm that the answers in this Q&A didn't solve your problem?
    – Yaron
    Apr 5, 2017 at 14:16
  • I can confirm that the suggested solution does not resolve the issue, as also stated in the Q from day one :-)
    – psv
    Apr 18, 2017 at 8:00

2 Answers 2

1
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com PUT_KEY_HERE

You would find the key in the error message like this:

....NO_PUBKEY KEY_IS_HERE

That was because, you need to authenticate it as a trusted site and you need a signing key. This command will create it.

2
  • As I wrote in the question, I tried this, but it does not help. It says 0 keys changed. So they are clearly there.
    – psv
    Apr 7, 2017 at 15:10
  • Sorry, I missed what you wrote there. This solved for me. I can't tell what else do you need, wish I could help. I was seeing the exact same error message. Apr 7, 2017 at 21:07
0

Seems like there is no resolution to this problem, so unfortunately the only valid solution know atm. is to re-install Ubuntu from scratch.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .