10

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 <[email protected]>
[...]

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?

3
  • 2
    Everything is in the instructions: wiki.winehq.org/Ubuntu For example: wget -nc dl.winehq.org/wine-builds/winehq.key && sudo mv winehq.key /usr/share/keyrings/winehq-archive.key further wget -nc dl.winehq.org/wine-builds/ubuntu/dists/jammy/… && sudo mv winehq-jammy.sources /etc/apt/sources.list.d/ Jun 9, 2022 at 6:19
  • 1
    Ah, perfect, your solution worked Jun 9, 2022 at 6:43
  • First bullet point in the "Winehq key problems" section fixes it for me. I'm always amazed how little the wine devs care for user experience :-P Especially as wine has a lot of users that just switched from Windows to Linux and have no idea how those things work ...
    – Fred
    Oct 27, 2022 at 11:46

3 Answers 3

17

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

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
2

I was facing the same issue.

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*

  1. 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.

Best regards! Rodrigo Souza

2
  • I don't understand. This all just seems to say, "If it doesn't work, delete it and stop trying." The link for "try[ing] to fix the repository instead of removing it" just listed the same instructions for adding the key, except in Spanish. They don't work, as mentioned in the original question.
    – TheLabCat
    Sep 20, 2022 at 15:11
  • For me, this turned out to be an apparent freak error in downloading the winehq-focal.sources file, where a slash was omitted from the key path. Adding back the slash fixed the problem.
    – TheLabCat
    Sep 20, 2022 at 15:27

You must log in to answer this question.

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