4

When I do the command below:

sudo apt-get upgrade

At the bottom I get an error saying

W: GPG error: http://download.opensuse.org  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8873E7BF70F1BBEA

How do I retrieve this key from the opensuse.org server? If I were to look on their website I won't be able to find the key. There are so many nested directories on the website, and I don't know where to look to find it. I don't even know what application or what update it's even for.


Update

I have followed the guides in the comments and it doesn't work. I moved my lists file, and created a new one when using apt-get update. I now have 15 PPA files, and 16 security files. After removing some of the other GPG keys, I now have even MORE errors when updating.

Kaz Wolfe
  • 33,802
  • 20
  • 111
  • 168
john smith
  • 2,963
  • 10
  • 37
  • 53
  • Which packages comes from this repository? – A.B. Nov 07 '15 at 19:33
  • How can I find out? – john smith Nov 07 '15 at 19:34
  • Have you added a lot of PPAs? If so, check out [this blog post](https://sudodblog.wordpress.com/2015/07/02/fixing-gpg-error-no_pubkey/). If you have more than 40 files in the `/var/lib/apt/lists` directory, it'll cause that error. – RPiAwesomeness Nov 07 '15 at 19:36
  • I have followed your guide and it doesn't work. I moved my lists file, and created a new one when using apt-get update. I now how 15 ppa files, and 16 security files. After removing some of the other gpg keys, I now have even MORE errors when updating. – john smith Nov 07 '15 at 19:53
  • Revert the changes. Which keys are now missing? – A.B. Nov 07 '15 at 20:01
  • I think both of you guys are going about this the wrong way. I need to work out which application is using this key. How do I find this? @AB, I just manually added the NEW keys having errors that were missing because I knew what it was for. Bare in mind, I'm still having the same problem as my original post. – john smith Nov 07 '15 at 20:01
  • Run this command `dpkg -l | awk '/^ii/ {system("apt-cache policy " $2)}' > out`. Post the content of `out` here http://paste.ubuntu.com/ and give me the link – A.B. Nov 07 '15 at 20:09
  • With the output of the command, we check if you need the repository. – A.B. Nov 07 '15 at 20:12
  • http://paste.ubuntu.com/13158962/ – john smith Nov 07 '15 at 20:13
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/31235/discussion-between-a-b-and-john-smith). – A.B. Nov 07 '15 at 20:14

1 Answers1

10

You have to import the right key with the following commands:

wget http://download.opensuse.org/repositories/home:osmc/xUbuntu_14.04/Release.key
sudo apt-key add - < Release.key
sudo apt-get update

Why? That's why:

The output of dpkg -l | awk '/^ii/ {system("apt-cache policy " $2)}' tells us that the repository has one package installed in your system:

osmc-installer:
  Installed: 111
  Candidate: 111
  Version table:
 *** 111 0
        500 http://download.opensuse.org/repositories/home:/osmc/xUbuntu_14.04/  Packages
        100 /var/lib/dpkg/status

And here are the install instructions for OSMC installer and how to import the key.


If you don't need the OSMC installer, remove the package

sudo apt-get remove osmc-installer

find the repository

grep -r 'download.opensuse.org' /etc/apt

and remove the repository

sudo rm /etc/apt/sources.list.d/osmc-installer.list*
cl-netbox
  • 30,845
  • 7
  • 93
  • 131
A.B.
  • 89,123
  • 21
  • 245
  • 323