今天在安装opencv时出现了一个问题,sudo apt update时报错:
W: GPG error: http://security.ubuntu.com trusty-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
网上给了很多解决方法,最有效的就是:sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
其实这个方法是对的,但是我试了以后报错:
gpg: requesting key F7AA50B3 from hkp server keyserver.ubuntu.com
gpgkeys: key 0429ACCAF7AA50B3 not found on keyserver
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
花了很大功夫,发现问题其实很简单。
把上面的办法稍微改一点就行了:sudo -E apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
后面在执行:sudo apt update 就不会报错了。