0

I'm following the official guide to install WineHQ on my ubuntu 20.4.2 machine.

sudo dpkg --add-architecture i386 
wget -nc https://dl.winehq.org/wine-builds/winehq.key

Which return

2021-03-27 23:49:12 (6.30 MB/s) - ‘winehq.key’ saved [3220/3220]

Now when I try to add this key,

sudo apt-key add winehq.key

I get this error:

gpg: invalid key resource URL '/tmp/apt-key-gpghome.pz8gFybm20/home:manuelschneid3r.asc.gpg'
gpg: keyblock resource '(null)': General error
gpg: key 7721F63BD38B4796: 2 signatures not checked due to missing keys
gpg: key 1488EB46E192A257: 1 signature not checked due to a missing key
gpg: key 1488EB46E192A257: 1 signature not checked due to a missing key
gpg: key 3B4FE6ACC0B21F32: 3 signatures not checked due to missing keys
gpg: key D94AA3F0EFE21092: 3 signatures not checked due to missing keys
gpg: key 871920D1991BC93C: 1 signature not checked due to a missing key
gpg: key 76F1A20FF987672F: 1 signature not checked due to a missing key
gpg: Total number processed: 10
gpg:       skipped new keys: 10

Even piping the command generate the same error. How to resolve it?

Update

I tried to update packages (guessing it will fix) but found this,

 falamiw@falamiw  ~  sudo apt-get update                                                           
Hit:1 http://packages.microsoft.com/repos/code stable InRelease
Get:2 https://dl.winehq.org/wine-builds/ubuntu focal InRelease [6,257 B]                                
Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease                                            
Err:2 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
Ign:4 http://ppa.launchpad.net/audacity-team/daily/ubuntu focal InRelease                               
Get:5 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [81.6 kB]                            
Hit:6 http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_20.04  InRelease          
Err:5 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease                                      
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FCC7D46ACCC4CF8
Hit:7 http://bd.archive.ubuntu.com/ubuntu focal InRelease                                               
Get:8 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]                 
Hit:9 http://ppa.launchpad.net/gerardpuig/ppa/ubuntu focal InRelease                                
Hit:10 http://archive.canonical.com/ubuntu focal InRelease                                          
Get:11 http://bd.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                             
Err:12 http://ppa.launchpad.net/audacity-team/daily/ubuntu focal Release                                
  404  Not Found [IP: 91.189.95.85 80]
Get:13 http://bd.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]              
Reading package lists... Done      
W: GPG error: 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
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu focal 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: GPG error: http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FCC7D46ACCC4CF8
E: The repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg 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.
E: The repository 'http://ppa.launchpad.net/audacity-team/daily/ubuntu focal Release' does not have a Release file.
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.

Then tried to solve this following this

 ✘ falamiw@falamiw  ~  sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys 76F1A20FF987672F
Executing: /tmp/apt-key-gpghome.D1LG9HG0HV/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 76F1A20FF987672F
gpg: key 76F1A20FF987672F: public key "WineHQ packages <wine-devel@winehq.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: invalid key resource URL '/tmp/apt-key-gpghome.D1LG9HG0HV/home:manuelschneid3r.asc.gpg'
gpg: keyblock resource '(null)': General error
gpg: key 7721F63BD38B4796: 2 signatures not checked due to missing keys
gpg: key 1488EB46E192A257: 1 signature not checked due to a missing key
gpg: key 1488EB46E192A257: 1 signature not checked due to a missing key
gpg: key 3B4FE6ACC0B21F32: 3 signatures not checked due to missing keys
gpg: key D94AA3F0EFE21092: 3 signatures not checked due to missing keys
gpg: key 871920D1991BC93C: 1 signature not checked due to a missing key
gpg: Total number processed: 10
gpg:       skipped new keys: 10
falamiw
  • 101
  • The above works for me; just to be sure, could you check that md5sum winehq.key returns 4fdb7de985264c6471f4e55397ad531e? – Markus Ueberall Mar 27 '21 at 18:23
  • Yes it return 4fdb7de985264c6471f4e55397ad531e winehq.key @MarkusUeberall, although same issue arise. – falamiw Mar 27 '21 at 18:26
  • I'd assume that the error is related to different keys, see https://askubuntu.com/a/1247655/525098 – Markus Ueberall Mar 27 '21 at 18:32
  • I tried it also but get rm: cannot remove '/etc/apt/trusted.gpg.d/home:manuelschneid3r.gpg': No such file or directory – falamiw Mar 27 '21 at 18:34
  • The files might be named differently; check the contents of /etc/apt/trusted.gpg.d/; alternatively, apt-key list might provide you with additional hints. I'd create a backup of said directory and delete all keys that gpg complains about using apt-key del <key-id>. If there are no more errors, retry to import winehq.key. The next time you run apt update, you should see which keys are missing and need to be re-imported. – Markus Ueberall Mar 27 '21 at 18:43
  • Sorry to ask so many questions, I am newly shifted to Ubuntu from windows maybe that's the reason. Could you see the files I have in /etc/apt/trusted.gpg.d have. Did I need to delete them all? @MarkusUeberall – falamiw Mar 27 '21 at 18:48
  • I see. The one file that points to your original error message should be the file with the colon; delete that one first. Afterwards, according to the missing keys from your second set of error messages, see https://askubuntu.com/a/985376/525098 how to import those missing keys. It looks like you somewhere skipped a step or two or somehow "lost" the keys in question along the way. – Markus Ueberall Mar 27 '21 at 18:52
  • I see thanks a lot @MarkusUeberall. I appreciate your work. But I can't delete the file as it was permission by root. I try to change the permission but couldn't chmod a+x home:manuelschneid3r.asc chmod: changing permissions of 'home:manuelschneid3r.asc': Operation not permitted I am really getting frustrated. – falamiw Mar 27 '21 at 18:58
  • Similar problem: https://askubuntu.com/a/1299708/410054 . Apparently you need to delete the Albert launcher keys. not relaly related with WineHQ – Fgblanch Aug 14 '22 at 03:47

1 Answers1

0

For whom who are facing the similar issue I faced,

  • In software & updates app → other softwares. Unchecked http://ppa.* (which create Err:* ), here is the original post where I get this.
  • If possible uninstall those software packages and reinstall them

For WineHQ I follow this instruction afterward, which create no issue at all. Thanks, @Markus Ueberall Who help me to figure out a lot of things and give solution to resolve them.

falamiw
  • 101