apt-get
运行apt-get update
时经常遇到的问题就行以下问题,导致无法更新或安装软件
秘钥不匹配、密钥找不到、过期、密钥错误、public key等问题。
W: GPG error: http://repo.mysql.com wheezy Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8C718D3B5072E1F5
比较简单的解决办法就是:
apt-get install debian-keyring debian-archive-keyring
apt-key update
apt-get upgrade #此时会重新获取正确的key并提示你确认
参考:https://my.oschina.net/emptytimespace/blog/83633
某些源地址错误导致无法更新
Get:7 http://security.debian.org wheezy/updates Release [39.0 kB]
Get:8 http://security.debian.org wheezy/updates/main amd64 Packages [548 kB]
Get:9 http://repo.mysql.com wheezy Release.gpg [173 B]
Get:10 http://repo.mysql.com wheezy Release [24.1 kB]
Ign http://repo.mysql.com wheezy Release
Get:11 http://mirrors.163.com wheezy-updates/main amd64 Packages [7047 B]
Err http://repo.mysql.com wheezy/mysql-5.6 amd64 Packages
Err http://repo.mysql.com wheezy/mysql-5.6 amd64 Packages
Err http://repo.mysql.com wheezy/mysql-5.6 amd64 Packages
Get:12 http://repo.mysql.com wheezy/mysql-5.6 amd64 Packages [2917 B]
Fetched 6812 kB in 16s (416 kB/s)
Reading package lists... Done
解决方法:
# 删除改错误源
rm /etc/apt/sources.list.d/mysql.list
评论区