28

When I sudo apt-get update I get the error shown below.

W: An error occurred during the signature verification. 
The repository is not updated and the previous index files will be used. 
GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: 
The following signatures couldn't be verified
 because the public key is not available: NO_PUBKEY 76F1A20FF987672F
W: Failed to fetch https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/InRelease
The following signatures couldn't be verified
 because the public key is not available: NO_PUBKEY 76F1A20FF987672F
W: Some index files failed to download. They have been ignored, or old ones used instead.

So I go ahead and change my mirror as suggested by this Ask Ubuntu answer. Then I restart the computer. And I still get the same error above when I sudo apt-get update.

Let's try and reinstall the keys.

$ wget -nc https://dl.winehq.org/wine-builds/Release.key && sudo apt-key add Release.key
File ‘Release.key’ already there; not retrieving. OK

And I might as well ping -c3 archive.ubuntu.com and my packet loss is 0%. What else do I need to do?

2
  • 2
    It looks like the new update for wine is signed with a different key than the Release.key they are hosting... Dec 20, 2018 at 3:20
  • 1
    Please use code formatting for command output (just like commands), not quote formatting.
    – muru
    Dec 20, 2018 at 5:08

6 Answers 6

24

As of 2018-12-19 08:07 there is a new winehq.key keyfile as mentioned here.

Download the new repository key and add it to the list of trusted keys:

cd /tmp
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt update

As mentioned by @jason-hunter in a comment, apt update will ask if you accept the changes in the repository, whereas apt-get update will show an error and fail.

0
22

Note that after adding the new keyfile, it is better to use apt update rather than apt-get update, as it will prompt you to accept the changes.

So in full:

wget -nc https://dl.winehq.org/wine-builds/winehq.key && sudo apt-key add winehq.key && sudo apt update
2
  • 2
    I also added the repository sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' and this solution worked. As mentioned you must use sudo apt update and not sudo apt-get update. apt forces you to explicitly accept, whereas apt-get does not and will yield an error. If you have other versions of Ubuntu your repository to add can be found here wiki.winehq.org/Ubuntu Dec 21, 2018 at 13:54
  • I would consider adding rm winehq.key or saving the file to the /temp at the beginning. Thanks anyway!
    – kcpr
    Jan 3, 2019 at 13:14
10

Inspecting https://dl.winehq.org/wine-builds/, there's a new file winehq.key. Try using that instead, as its fingerprint seems to match the error:

# curl -sL "https://dl.winehq.org/wine-builds/Release.key" | gpg --dry-run --import --verbose
gpg: pub  rsa4096/818A435C5FCBF54A 2015-11-23  Sebastian Lackner (WineHQ packages) <[email protected]>
gpg: Total number processed: 1
# curl -sL "https://dl.winehq.org/wine-builds/winehq.key" | gpg --dry-run --import --verbose
gpg: pub  rsa3072/76F1A20FF987672F 2018-12-10  WineHQ packages <[email protected]>
gpg: key 76F1A20FF987672F: 1 signature not checked due to a missing key
gpg: Total number processed: 1
0
7

This command worked for me:

wget -nc https://dl.winehq.org/wine-builds/winehq.key && apt-key add winehq.key
0

I recently was getting the same error too:

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

As it turns out, the pubkey needed to be added to my host. Adding the key is the last 8 digits of the key you see there F987672F. So add that to the following to add the key to your host:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv F987672F

Hope this helps!

0

I use docker witch node, java, angular and electron this works:

FROM node:16.15.0

WORKDIR /work
COPY package.json .

RUN apt update
RUN apt-get -y install zip unzip

# node_modules witch angular and electron
RUN npm install -g n @angular/cli electron electron-builder

# JAVA
RUN apt-get -y install default-jre
RUN apt install openjdk-11-jre-headless 

# Wine (Wine32)
RUN apt install -y software-properties-common
RUN dpkg --add-architecture i386
RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key
RUN apt-key add winehq.key
RUN add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ buster main'
RUN apt update
RUN apt -y install --install-recommends winehq-stable

EXPOSE 3002

You must log in to answer this question.

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