apt-get 的种种问题

出现以下这个错误时:

BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>


1.用vi文件编辑工具在linux创建一人新文件“apt-wilson.sh”;


sudo apt-get clean
cd /var/lib/apt
sudo rm -rf lists.old
sudo mv lists lists.old

gpg --delete-key --armor 40976EAF437D05B5
sudo apt-key del 40976EAF437D05B5

gpg --keyserver-options http-proxy --keyserver keyserver.ubuntu.com --recv 0976EAF437D05B5
gpg --export --armor 40976EAF437D05B5 | sudo apt-key add -

sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update


2.然后用命令行"./apt-wilson.sh"执行它

执行完成后还有以下错误

W: GPG error: http://mirrors.aliyun.com precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://mirrors.aliyun.com precise-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://mirrors.aliyun.com precise-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://security.ubuntu.com precise-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5

3.然后再执行以下命令行:

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5

4.最的再执行下面的命令行应该就没有问题了

apt-get update



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值