I successfully installed Wine 6.0.3 about a while back and am trying to upgrade to version 7. I am using Ubuntu 22.4.01 LTS. Everything went well until I tried to do "sudo apt update". Then I got the following error message:
Err:4 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
Reading package lists... Done
W: https://dl.winehq.org/wine-builds/ubunt ... /InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
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 kept going anyway but had unmet dependencies:
sudo apt install --install-recommends winehq-stable
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
winehq-stable : Depends: wine-stable (= 7.0.1~focal-1)
E: Unable to correct problems, you have held broken packages.
That led to further unmet dependencies:
sudo apt install --install-recommends wine-stable
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
wine-stable-i386:i386 : Depends: libldap-2.4-2:i386 (>= 2.4.7) but it is not installable
Recommends: libglu1-mesa:i386 but it is not going to be installed or
libglu1:i386
Recommends: libodbc1:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
It looks like you (also) have the repository for Ubuntu Focal enabled.
You can remove it from /etc/apt/sources.list or delete the repository file from /etc/apt/sources.list.d/.
Err:4 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
Reading package lists... Done
W: https://dl.winehq.org/wine-builds/ubunt ... /InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
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.
This problem must be solved.
If you followed the Wiki, check if the Wine key is stored in the right place.