linux服务器换源问题
作者:互联网
前言
在使用服务器安装docker环境的时候,想装一些常用的linux工具,在装换源的时候出了问题
警告信息如下
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
E: The repository 'http://mirrors.aliyun.com/ubuntu bionic 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.
W: GPG error: http://mirrors.aliyun.com/ubuntu bionic-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
解决办法
由于没有公钥,无法验证下列签名: NO_PUBKEY 3B4FE6ACC0B21F32的问题,可以在终端中运行:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
但是运行后又出现如下报错
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
解决办法:
使用如下命令安装gnupg2即可
apt-get update && apt-get install -y gnupg2
重新执行命令即可.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
标签:keyserver,--,ubuntu,apt,换源,key,linux,服务器,com 来源: https://blog.csdn.net/weixin_43900387/article/details/112407944