W: GPG error: https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 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.
ubuntu系统更新出现这样的报错那就是没有公钥认证了。在报错信息中可以看到NO_PUBKEY A4B469963BF863CC,即没有公钥A4B469963BF863CC
然后直接执行下面指令:
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com A4B469963BF863CC
即apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 报错显示的公钥。
接着继续运行前面的更新指令
apt-get update
最后成功更新。
写在最后:
这个bug能不修复就不修复,因为修复了这个bug之后,pip就会出问题,报错如下:
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip 20.2.1 from /usr/local/anaconda3/lib/python3.6/site-packages/pip (python 3.6)
与pip相关的一切指令都会出错。所以最好不要去修复这个bug,并且它不影响后面代码运行。