问题描述

在更换apt-get国内镜像源后运行sudo apt-get update报错:
W: GPG error: https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 3B4FE6ACC0B21F32
E: The repository ‘https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease’ is not signed.
在这里插入图片描述

问题原因

一般是因为公钥缺少,apt无法验证软件包的签名。

解决方案

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  3B4FE6ACC0B21F32

–recv-keys 后面的公钥为报错中NO_PUBKEY 后面的公钥

然后再运行sudo apt-get update 就没有报错了

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐