Trouble with wine

I tried installing wine on my system now error in sudo apt update:

Reading package lists... Done
W: GPG error: 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
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I did this once before but cannot remember how to fix this...

My notes from a um22.04 test

sudo wget -O https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
sudo apt update
sudo apt install wine64
wine --version

to test, wine clock

2 Likes

Thanks @pavlos_kairis I will try that when I get home. Also before you posted this I ran another command (I know, don't enter random commands), but I looked at the command and it looked like it would add the key for wine, but alas it messed up sudo apt update. I will post that result also when I get home.

wget missing URL from first command

Complete output of sudo apt update:

sudo apt update
Get:1 https://dl.winehq.org/wine-builds/ubuntu jammy InRelease [8,041 B]
Hit:2 http://ca.archive.ubuntu.com/ubuntu jammy InRelease                      
Err:1 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
Hit:3 http://dl.google.com/linux/earth/deb stable InRelease                    
Get:4 http://ca.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]     
Hit:5 http://repository.spotify.com stable InRelease                           
Hit:6 https://dl.google.com/linux/chrome/deb stable InRelease                  
Get:7 http://ca.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]  
Get:8 http://ca.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]    
Get:9 http://ca.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [818 kB]
Hit:10 https://ppa.launchpadcontent.net/stellarium/stellarium-releases/ubuntu jammy InRelease
Get:11 http://ca.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [407 kB]
Get:12 http://ca.archive.ubuntu.com/ubuntu jammy-updates/main amd64 DEP-11 Metadata [97.2 kB]
Get:13 http://ca.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [783 kB]
Get:14 http://ca.archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [559 kB]
Get:15 http://ca.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 DEP-11 Metadata [257 kB]
Get:16 http://ca.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 DEP-11 Metadata [940 B]
Get:17 http://ca.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 DEP-11 Metadata [11.5 kB]
Get:18 http://ca.archive.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [41.5 kB]
Get:19 http://ca.archive.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [13.3 kB]
Reading package lists... Done                                        
W: GPG error: 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
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target Translations (main/i18n/Translation-en_CA) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1

any idea how to fix?

omit the -O flag

sudo wget https://dl.winehq.org/wine-builds/winehq.key

or use the -O flag which needs a filename

sudo wget -O winehq.key https://dl.winehq.org/wine-builds/winehq.key

For reference:

https://wiki.winehq.org/Ubuntu

Seems like I always have to "monkey around" to get WINE to install properly. Having said that, my notes show that I successfully installed WINE in Jan21 and Jul22 from Synaptic Pkg Manager.

In my case, I even have to install a Win32 Prefix inorder to run ACAD2000. Aggravating, but once I get it working ACAD 2000 runs splendidly.

Thanks that worked, but of course I also messed up my updates with something else. I will try to look in the history and post what I ran. In the meantime here is the last output part of sudo apt update:

Reading package lists... Done
W: GPG error: Index of /wine-builds/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
E: The repository 'Index of /wine-builds/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target Translations (main/i18n/Translation-en_CA) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/archive_uri-https_dl_winehq_org_wine-builds_ubuntu_-jammy.list:1 and /etc/apt/sources.list.d/winehq-jammy.sources:1

wget -nc https://dl.winehq.org/wine-builds/winehq.key

was what I think created this issue

I did it this morning and got wine 7.0.1

ok, so I am trying to fix this issue. Commented out both lines in this file in /etc/apt/sources.list.d

Err:5 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
Hit:9 https://ppa.launchpadcontent.net/papirus/papirus/ubuntu jammy InRelease
Hit:10 https://ppa.launchpadcontent.net/stellarium/stellarium-releases/ubuntu jammy InRelease
Reading package lists... Done                              
W: GPG error: 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
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

removed winehq-jammy.sources from /etc/apt/sources.list.d (Moved to desktop)

no more error, but wine is still not working. Should I uninstall it and try to find the right instructions to install wine?

Hopefully you saw what I previously posted. Synaptic Pkg Manager successfully installed WINE "brainlessly for me". No messing with PPAs and such. You should probably clean out existing WINE entries first (I am no expert on purging).

Synaptic is located in the Software Boutique.

@mickee

Brian, this is what I did this morning (followed the winehq.org guide) and got wine 7.0.1

sudo dpkg --add-architecture i386 
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
sudo apt update
sudo apt install --install-recommends winehq-stable

Sorry for sending old instructions earlier on.

So should I just run this or should I remove the current version of wine first?

just run it, it should overwrite the old wine.

Thanks @pavlos_kairis