目录
Ubuntu换阿里云源后更新提示:GPG error缺少公钥解决方法
尝试清除已存在的软件源信息并重新添加
Clear your package sources:有时候,错误的来源可能是由于旧的或者损坏的软件源信息。你可以尝试清除已存在的软件源信息并重新添加。在Ubuntu上,你可以使用以下命令来清除软件源信息:
sudo rm -rf /etc/apt/sources.list.d/*
sudo apt update
重新配置ubunut镜像源,我这边用的是阿里云的源
阿里源配置
Vim /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
Ubuntu换阿里云源后更新提示:GPG error缺少公钥解决方法
解决办法:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
再次执行apt update 基本就可以了