运行
sudo apt-get update
报错
W: GPG error: http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY BA6932366A755776
W: The repository 'http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
解决办法
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA6932366A755776
注意最后一串数字字母改成自己的那个失效的(报错信息里面的):NO_PUBKEY BA6932366A755776
运行结果如下:
joanna@joanna-System-Product-Name:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA6932366A755776
Executing: /tmp/tmp.ntHwsGlfhO/gpg.1.sh --keyserver
keyserver.ubuntu.com
--recv-keys
BA6932366A755776
gpg: requesting key 6A755776 from hkp server keyserver.ubuntu.com
gpg: key 6A755776: public key "Launchpad PPA for deadsnakes" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
joanna@joanna-System-Product-Name:~$ sudo apt-get update
Hit:1 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:2 http://linux.teamviewer.com/deb stable InRelease
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:4 http://cn.archive.ubuntu.com/ubuntu xenial InRelease
Hit:5 http://packages.ros.org/ros/ubuntu xenial InRelease
Get:6 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease [18.1 kB]
Hit:7 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:8 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease
Ign:9 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 InRelease
Hit:10 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease
Hit:11 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 Release
Ign:13 https://deepin-wine.i-m.dev InRelease
Hit:14 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial InRelease
Get:15 https://deepin-wine.i-m.dev Release [1,611 B]
Ign:16 https://deepin-wine.i-m.dev Release.gpg
Fetched 19.7 kB in 2s (7,804 B/s)
Reading package lists... Done
joanna@joanna-System-Product-Name:~$