12

I am simply trying to run sudo apt update, but am encountering the seemingly classic error of:

Err:9 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
Err:10 https://dl.winehq.org/wine-builds/ubuntu jammy InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F

This is all well and good. Several sources [1][2] Mention this as a quick and easy fix, specifically for that key: wget -nc https://dl.winehq.org/wine-builds/winehq.key && sudo apt-key add winehq.key && sudo apt update

But when I run the command, but it still bounces back at the sudo apt update step with the same error, even though the key seemed to have been correctly added. I even double checked this like so:

$ apt-key list
/etc/apt/trusted.gpg
--------------------
[...]

pub rsa3072 2018-12-10 [SC] D43F 6401 4536 9C51 D786 DDEA 76F1 A20F F987 672F uid [ unknown] WineHQ packages <wine-devel@winehq.org> [...]

The key has clearly already been added, and the later half of the string associated with the key listing also corresponds (DDEA 76F1 A20F F987 672F ~= 76F1A20FF987672F).

What am I missing? Why does sudo apt update seemingly just ignore this newly added key?

How can I run sudo apt update successfully in this situation?

Scientist
  • 112

3 Answers3

18

I had this problem too. In my case, the solution was to simply follow the instructions at the WineHQ Wiki when adding the repository, see page Ubuntu WineHQ Repository

sudo mkdir -pm755 /etc/apt/keyrings

sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

It looks that the old variant to add the repo is no longer working. The new method must be used which works for me perfectly well. No longer any : NO_PUBKEY 76F1A20FF987672F error message! :-D

Clemens
  • 541
3

I had the same trouble, I tried removing the repo files but adding the latest key resolved my error

sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
Aindriú
  • 141
  • 1
  • 7
2

I tryed to solve using the Program Update interface, but it doesn't worked.

So I found this: (below the link for the complete article)

  1. Identify problematic repositories:

     sudo apt update
    
  2. Go to /etc/apt/sources.list.d folder and locate the unwanted repositories files

     cd /etc/apt/sources.list.d/ && ls
    
  3. Manually remove unwanted files

     sudo rm problematic-repository-name-.list*
    

    Example

     sudo rm ubuntu-wine-ubuntu-ppa-focal.list*
    
  4. Try sudo apt update again. (if it works for you, repet the process for each unworking repository.)

Complete article here.

PS.: It is in portuguese but is simple and functional. Credits and thanks to: Sandro de Castro)

FOR THE NO_PUBKEY 76F1A20FF987672F problem

  1. Open the Program Updat -> Setings in the Auth or Authentication

  2. Select the 76F1A20FF987672F then click Remove

  3. Close, done!


If you prefer to try to fix the repository instead of removing it. Try this:

EXECUTION ERROR - WINE [SOLVED]

For more information you might want to see this:

Apt-key is now deprecated. If you get a warning about this, remove the key with:

sudo apt-key del "D43F 6401 4536 9C51 D786 DDEA 76F1 A20F F987 672F" And remove the the line about the WineHQ repository from /etc/apt/sources.list.

I'm not a Linux expert, but I hope I could have helped you.

Pablo Bianchi
  • 17,371