修复Ubuntu Update BADSIG 40976EAF437D05B5 问题

本文提供了解决APT无法正常更新的两种方法。首先介绍了通过清理缓存、重命名文件夹及重新建立部分文件夹来解决问题的步骤;其次给出了使用aptitude命令并设置特定参数的备选方案。

修复方法:
sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update

上面的方法不行可以试试下面这个
sudo aptitude -o Acquire::http::No-Cache=True -o Acquire::BrokenProxy=true update

chuxianzhgecuowu:获取:1 http://mirrors.aliyun.com/ubuntu xenial InRelease [247 kB] 获取:2 http://mirrors.aliyun.com/ubuntu xenial-security InRelease [106 kB] 错误:1 http://mirrors.aliyun.com/ubuntu xenial InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 获取:3 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease [106 kB] 获取:4 http://mirrors.aliyun.com/ubuntu xenial-proposed InRelease [257 kB] 错误:2 http://mirrors.aliyun.com/ubuntu xenial-security InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 获取:5 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease [106 kB] 错误:3 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 错误:4 http://mirrors.aliyun.com/ubuntu xenial-proposed InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 错误:5 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease 由于没有公钥,无法验证下列签名: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 正在读取软件包列表... 完成 W: GPG 错误:http://mirrors.aliyun.com/ubuntu xenial InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 E: 仓库 “http://mirrors.aliyun.com/ubuntu xenial InRelease” 没有数字签名。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 W: GPG 错误:http://mirrors.aliyun.com/ubuntu xenial-security InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 E: 仓库 “http://mirrors.aliyun.com/ubuntu xenial-security InRelease” 没有数字签名。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 W: GPG 错误:http://mirrors.aliyun.com/ubuntu xenial-updates InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 E: 仓库 “http://mirrors.aliyun.com/ubuntu xenial-updates InRelease” 没有数字签名。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。 W: GPG 错误:http://mirrors.aliyun.com/ubuntu xenial-proposed InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY 40976EAF4
08-13
Ign:1 http://mirrors.aliyun.com/ubuntu trusty InRelease Get:2 http://mirrors.aliyun.com/ubuntu trusty-security InRelease [56.5 kB] Get:3 http://mirrors.aliyun.com/ubuntu trusty-updates InRelease [56.5 kB] Get:4 http://mirrors.aliyun.com/ubuntu trusty-proposed InRelease [56.5 kB] Get:5 http://mirrors.aliyun.com/ubuntu trusty-backports InRelease [56.5 kB] Hit:6 http://mirrors.aliyun.com/raspberrypi buster InRelease Get:7 http://mirrors.aliyun.com/ubuntu trusty Release [58.5 kB] Err:2 http://mirrors.aliyun.com/ubuntu trusty-security InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 Get:8 http://mirrors.aliyun.com/ubuntu trusty Release.gpg [933 B] Err:3 http://mirrors.aliyun.com/ubuntu trusty-updates InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 Err:4 http://mirrors.aliyun.com/ubuntu trusty-proposed InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 Err:5 http://mirrors.aliyun.com/ubuntu trusty-backports InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 Ign:8 http://mirrors.aliyun.com/ubuntu trusty Release.gpg Reading package lists... Done W: GPG error: http://mirrors.aliyun.com/ubuntu trusty-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 E: The repository 'http://mirrors.aliyun.com/ubuntu trusty-security 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 trusty-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 E: The repository 'http://mirrors.aliyun.com/ubuntu trusty-updates 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 trusty-proposed InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 E: The repository 'http://mirrors.aliyun.com/ubuntu trusty-proposed 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 trusty-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 E: The repository 'http://mirrors.aliyun.com/ubuntu trusty-backports 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 trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32 E: The repository 'http://mirrors.aliyun.com/ubuntu trusty Release' 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.
09-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值