“Pro-test effective” solution: how to disable dl.winehq.org | kali remove winehq source | cannot verify the following signature because there is no public key: NO_PUBKEY 76F1A20FF987672F

The following is the entire problem flow, if you don’t need to understand, skip to the final solution! ! ! Partially enough

The article has a total of 9557 words

Found a problem

Today, the update upgrade frequently reports errors and is very slow:

┌──(root?kali-raspberry-pi)-[~]
└─# sudo apt update
sudo apt upgrade
Get: 1 http://mirrors.ustc.edu.cn/kali kali-rolling InRelease [41.2 kB]
Hits: 2 http://mirrors.aliyun.com/kali kali-rolling InRelease
Hits: 3 http://http.re4son-kernel.com/re4son kali-pi InRelease
Hits: 4 http://repo.mysql.com/apt/ubuntu bionic InRelease
Ignored: 5 https://dl.winehq.org/wine-builds/ubuntu kali-rolling InRelease
Get: 6 https://dl.winehq.org/wine-builds/debian buster InRelease [6,266 B]
Error: 7 https://dl.winehq.org/wine-builds/ubuntu kali-rolling Release
  404 Not Found [IP: 151.101.78.217 443]
Error: 6 https://dl.winehq.org/wine-builds/debian buster InRelease
  The following signature could not be verified because there is no public key: NO_PUBKEY 76F1A20FF987672F
Reading package list... Done
E: The warehouse "https://dl.winehq.org/wine-builds/ubuntu kali-rolling Release" has no Release file.
N: The source cannot be safely updated, so it is disabled by default.
N: See the apt-secure(8) manual for details on repository creation and user configuration.
W: GPG error: https://dl.winehq.org/wine-builds/debian buster InRelease: The following signature could not be verified because there is no public key: NO_PUBKEY 76F1A20FF987672F
E: The repository "https://dl.winehq.org/wine-builds/debian buster InRelease" is not digitally signed.
N: The source cannot be safely updated, so it is disabled by default.
N: See the apt-secure(8) manual for details on repository creation and user configuration.
Reading package list... Done
Analyzing dependency tree for package... Done
Reading status information... Done
Calculating updates... Done
Versions of the following packages will remain unchanged:
  default-mysql-server pgcli php-common powershell-empire python3-pgspecial qterminal
  qtermwidget5-data
The following packages will be upgraded:
  aspell-en bubblewrap chromium chromium-common chromium-l10n chromium-sandbox colord
  colord-data cron cron-daemon-common curl dbus dbus-bin dbus-daemon
  dbus-session-bus-common dbus-system-bus-common dbus-user-session dbus-x11
  desktop-base distro-info-data dpkg dpkg-dev dvisvgm exploitdb firmware-amd-graphics
  firmware-atheros firmware-intel-sound firmware-iwlwifi firmware-libertas
  firmware-linux firmware-linux-nonfree
-----------------------------------The latter is omitted------------- -------------------------

Attempt to analyze

I remember that when I tried to install winehq a few days ago, I accidentally introduced the wrong warehouse (there is a problem with domestic access), and the following message will be prompted

Error: 7 https://dl.winehq.org/wine-builds/ubuntu kali-rolling Release
404 Not Found [IP: 151.101.78.217 443]
Error: 6 https://dl.winehq.org/wine-builds/debian buster InRelease
The following signature could not be verified because there is no public key: NO_PUBKEY 76F1A20FF987672F
Reading package list… Done
E: The warehouse “https://dl.winehq.org/wine-builds/ubuntu kali-rolling Release” has no Release file.
N: The source cannot be safely updated, so it is disabled by default.
N: See the apt-secure(8) manual for details on repository creation and user configuration.
W: GPG error: https://dl.winehq.org/wine-builds/debian buster InRelease: The following signature could not be verified because there is no public key: NO_PUBKEY 76F1A20FF987672F
E: The repository “https://dl.winehq.org/wine-builds/debian buster InRelease” is not digitally signed.
N: The source cannot be safely updated, so it is disabled by default.
N: See the apt-secure(8) manual for details on repository creation and user configuration.

https://dl.winehq.org/wine-builds/ubuntu kali-rolling Release and https://dl.winehq.org/wine-builds/debian buster InRelease were not found when viewing the source

┌──(root?kali-raspberry-pi)-[~]
└─# vi /etc/apt/sources.list

The backtracking code found the problem when qq-wine was installed before

┌──(root?kali-raspberry-pi)-[~]
└─# #!/bin/sh
echo 'Adding 32-bit architecture support'
sudo dpkg --add-architecture i386
wget https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key
echo 'Adding Wine source'
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
echo 'updating source'
sudo apt-get update
echo 'Installing a stable version of Wine'
sudo apt-get install --install-recommends winehq-stable
echo 'Installing winetricks'
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
sudo cp winetricks /usr/local/bin
echo 'The installation is complete, enter the downloaded Wine QQ folder after restarting, and execute sh qq.sh on the terminal'

lock question code

echo 'Adding Wine source'
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/

Try to solve (difficult tortuous)

So all kinds of searches are useless

I surpass his grandma
They were all searched before, I surpassed his grandma

Then I saw an article on adding and deleting PPA sources in Ubuntu system – Jianshu In Ubuntu systems, third-party software often needs to be installed. At this time, you need to add the PPA source of the software first, and then install the software. Baidu Encyclopedia explains PPA as: Personal Package Archives (a… https://www.jianshu.com/p/ecaca7079443

I thought it was over

┌──(root?kali-raspberry-pi)-[~]
└─# sudo add-apt-repository -r https://dl.winehq.org/wine-builds/ubuntu/
    sudo add-apt-repository -r https://dl.winehq.org/wine-builds/debian buster InRelease

┌──(root?kali-raspberry-pi)-[~]
└─# sudo add-apt-repository -r https://dl.winehq.org/wine-builds/debian/

I didn’t expect it to be more violent

Reform attempt

┌──(root?kali-raspberry-pi)-[~]
└─# sudo add-apt-repository -r https://dl.winehq.org/wine-builds/debian
    sudo add-apt-repository -r https://dl.winehq.org/wine-builds/ubuntu
Repository: 'deb https://dl.winehq.org/wine-builds/debian kali-rolling main'
Description:
Archive for codename: kali-rolling components: main
More info: https://dl.winehq.org/wine-builds/debian
Removing repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Get: 1 http://mirrors.ustc.edu.cn/kali kali-rolling InRelease [41.2 kB]
Hits: 2 http://mirrors.aliyun.com/kali kali-rolling InRelease
Hits: 3 http://http.re4son-kernel.com/re4son kali-pi InRelease
Get: 4 https://dl.winehq.org/wine-builds/debian buster InRelease [6,266 B]
Hits: 5 http://repo.mysql.com/apt/ubuntu bionic InRelease
Error: 4 https://dl.winehq.org/wine-builds/debian buster InRelease
  The following signature could not be verified because there is no public key: NO_PUBKEY 76F1A20FF987672F
Reading package list... Done
N: Skipping fetching of configuration file 'main/binary-i386/Packages' since repository 'http://http.re4son-kernel.com/re4son kali-pi InRelease' does not support 'i386' architecture.
W: GPG error: https://dl.winehq.org/wine-builds/debian buster InRelease: The following signature could not be verified because there is no public key: NO_PUBKEY 76F1A20FF987672F
E: The repository "https://dl.winehq.org/wine-builds/debian buster InRelease" is not digitally signed.
N: The source cannot be safely updated, so it is disabled by default.
N: See the apt-secure(8) manual for details on repository creation and user configuration.
W: http://repo.mysql.com/apt/ubuntu/dists/bionic/InRelease: key stored in outdated trusted.gpg keyring (/etc/apt/trusted.gpg), see apt- DEPRECATION section of key(8) for details.
N: Skipping fetching of configuration file 'mysql-apt-config/binary-armhf/Packages' because repository 'http://repo.mysql.com/apt/ubuntu bionic InRelease' does not support 'armhf' architecture.
N: Skipping fetching of configuration file 'mysql-tools/binary-armhf/Packages' because repository 'http://repo.mysql.com/apt/ubuntu bionic InRelease' does not support 'armhf' architecture.
Repository: 'deb https://dl.winehq.org/wine-builds/ubuntu kali-rolling main'
Description:
Archive for codename: kali-rolling components: main
More info: https://dl.winehq.org/wine-builds/ubuntu
Removing repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Get: 1 http://mirrors.ustc.edu.cn/kali kali-rolling InRelease [41.2 kB]
Hits: 2 http://mirrors.aliyun.com/kali kali-rolling InRelease
Hits: 3 http://http.re4son-kernel.com/re4son kali-pi InRelease
Hits: 4 http://repo.mysql.com/apt/ubuntu bionic InRelease
Get: 5 https://dl.winehq.org/wine-builds/debian buster InRelease [6,266 B]
Error: 5 https://dl.winehq.org/wine-builds/debian buster InRelease
  The following signature could not be verified because there is no public key: NO_PUBKEY 76F1A20FF987672F
Reading package list... Done
N: Skipping fetching of configuration file 'main/binary-i386/Packages' since repository 'http://http.re4son-kernel.com/re4son kali-pi InRelease' does not support 'i386' architecture.
W: http://repo.mysql.com/apt/ubuntu/dists/bionic/InRelease: key stored in outdated trusted.gpg keyring (/etc/apt/trusted.gpg), see apt- DEPRECATION section of key(8) for details.
N: Skipping fetching of configuration file 'mysql-apt-config/binary-armhf/Packages' because repository 'http://repo.mysql.com/apt/ubuntu bionic InRelease' does not support 'armhf' architecture.
N: Skipping fetching of configuration file 'mysql-tools/binary-armhf/Packages' because repository 'http://repo.mysql.com/apt/ubuntu bionic InRelease' does not support 'armhf' architecture.
W: GPG error: https://dl.winehq.org/wine-builds/debian buster InRelease: The following signature could not be verified because there is no public key: NO_PUBKEY 76F1A20FF987672F
E: The repository "https://dl.winehq.org/wine-builds/debian buster InRelease" is not digitally signed.
N: The source cannot be safely updated, so it is disabled by default.
N: See the apt-secure(8) manual for details on repository creation and user configuration.

┌──(root?kali-raspberry-pi)-[~]
└─# sudo apt update
sudo apt upgrade
Get: 1 http://mirrors.ustc.edu.cn/kali kali-rolling InRelease [41.2 kB]
Hits: 2 http://mirrors.aliyun.com/kali kali-rolling InRelease
Hits: 3 http://http.re4son-kernel.com/re4son kali-pi InRelease
Get: 4 https://dl.winehq.org/wine-builds/debian buster InRelease [6,266 B]
Hits: 5 http://repo.mysql.com/apt/ubuntu bionic InRelease
Error: 4 https://dl.winehq.org/wine-builds/debian buster InRelease
  The following signature could not be verified because there is no public key: NO_PUBKEY 76F1A20FF987672F
Reading package list... Done
N: Skipping fetching of configuration file 'main/binary-i386/Packages' since repository 'http://http.re4son-kernel.com/re4son kali-pi InRelease' does not support 'i386' architecture.
W: GPG error: https://dl.winehq.org/wine-builds/debian buster InRelease: The following signature could not be verified because there is no public key: NO_PUBKEY 76F1A20FF987672F
E: The repository "https://dl.winehq.org/wine-builds/debian buster InRelease" is not digitally signed.
N: The source cannot be safely updated, so it is disabled by default.
N: See the apt-secure(8) manual for details on repository creation and user configuration.
W: http://repo.mysql.com/apt/ubuntu/dists/bionic/InRelease: key stored in outdated trusted.gpg keyring (/etc/apt/trusted.gpg), see apt- DEPRECATION section of key(8) for details.
N: Skipping fetching of configuration file 'mysql-apt-config/binary-armhf/Packages' because repository 'http://repo.mysql.com/apt/ubuntu bionic InRelease' does not support 'armhf' architecture.
N: Skipping fetching of configuration file 'mysql-tools/binary-armhf/Packages' because repository 'http://repo.mysql.com/apt/ubuntu bionic InRelease' does not support 'armhf' architecture.
Reading package list... Done
Analyzing dependency tree for package... Done
Reading status information... Done
Calculating updates... Done
Versions of the following packages will remain unchanged:
  default-mysql-server pgcli php-common powershell-empire python3-pgspecial
  qterminal qtermwidget5-data
0 packages were upgraded, 0 packages were newly installed, 0 packages were to be uninstalled, and 7 packages were not upgraded.

┌──(root?kali-raspberry-pi)-[~]
└─#

There is a turning point amidst difficulties and twists

Then I saw another article

How to delete a ppa source on the command line :user/ppa-name can also open [Software Center]->[Software Source]->[Other Software], select Add, and enter the content in the format of ppa:user/ppa-name in the AT line in the pop-up window. For example, to add a user named eugenesan to java source https://blog.csdn.net/longyinyushi/article/details/50612649 where

The final solution! ! !

According to

Then enter the /etc/apt/sources.list.d directory and delete the saved file of the corresponding ppa source.
Finally, update it as well.

enter directory

remove the culprit

Finally fixed it!

┌──(kali?kali-raspberry-pi)-[~]
└─$ sudo apt update
Get: 1 http://mirrors.ustc.edu.cn/kali kali-rolling InRelease [41.2 kB]
Hits: 2 http://mirrors.aliyun.com/kali kali-rolling InRelease
Hits: 3 http://http.re4son-kernel.com/re4son kali-pi InRelease
Hits: 4 http://repo.mysql.com/apt/ubuntu bionic InRelease
41.2 kB downloaded in 2 seconds (19.7 kB/s)
Reading package list... Done
Analyzing dependency tree for package... Done
Reading status information... Done
There are 7 packages that can be upgraded. Please do 'apt list --upgradable' to see them.
N: Skipping fetching of configuration file 'main/binary-i386/Packages' since repository 'http://http.re4son-kernel.com/re4son kali-pi InRelease' does not support 'i386' architecture.
W: http://repo.mysql.com/apt/ubuntu/dists/bionic/InRelease: key stored in outdated trusted.gpg keyring (/etc/apt/trusted.gpg), see apt- DEPRECATION section of key(8) for details.
N: Skipping fetching of configuration file 'mysql-apt-config/binary-armhf/Packages' because repository 'http://repo.mysql.com/apt/ubuntu bionic InRelease' does not support 'armhf' architecture.
N: Skipping fetching of configuration file 'mysql-tools/binary-armhf/Packages' because repository 'http://repo.mysql.com/apt/ubuntu bionic InRelease' does not support 'armhf' architecture.
                                                                                                    
┌──(kali?kali-raspberry-pi)-[~]
└─$ sudo apt upgrade
Reading package list... Done
Analyzing dependency tree for package... Done
Reading status information... Done
Calculating updates... Done
Versions of the following packages will remain unchanged:
  default-mysql-server pgcli php-common powershell-empire python3-pgspecial qterminal
  qtermwidget5-data
0 packages were upgraded, 0 packages were newly installed, 0 packages were to be uninstalled, and 7 packages were not upgraded.
                                                                                                    
┌──(kali?kali-raspberry-pi)-[~]
└─$

Welcome to discuss development issues with me (big guys please avoid!)

My WeChat: wy1709824550

My Q-Q: 1709824550

A question discussion group will be established in the future. Welcome to join the Red Packet!