解决腾讯云服务器更新源出现\”There is no public key available\”错误

今天老 左有在配置一台腾讯云服务器的时候,登录服务器习惯性的apt update升级软件源,但是这次并不是这么顺利的升级而是出现\”W: There is no public key available for the following key IDs\”这样的错误信息,可见应该是没有升级完成的。

Get:8 http://mirrors.tencentyun.com jessie/main Sources [7,063 kB]
Hit http://mirrors.tencentyun.com jessie/contrib Sources
Get:9 http://mirrors.tencentyun.com jessie/non-free Sources [99.2 kB]
Get:10 http://mirrors.tencentyun.com jessie/main amd64 Packages [6,818 kB]
Hit http://mirrors.tencentyun.com jessie/contrib amd64 Packages
Get:11 http://mirrors.tencentyun.com jessie/non-free amd64 Packages [83.2 kB]
Get:12 http://mirrors.tencentyun.com jessie/main i386 Packages [6,821 kB]
Hit http://mirrors.tencentyun.com jessie/contrib i386 Packages
Get:13 http://mirrors.tencentyun.com jessie/non-free i386 Packages [79.5 kB]
Hit http://mirrors.tencentyun.com jessie/contrib Translation-en
Get:14 http://mirrors.tencentyun.com jessie/main Translation-en [4,581 kB]
Get:15 http://mirrors.tencentyun.com jessie/non-free Translation-en [72.0 kB]
Fetched 27.8 MB in 5s (5,040 kB/s)
Reading package lists… Done
W: There is no public key available for the following key IDs:
AA8E81B4331F7F50

这个类似的问题老 左博客(LAOZUO.ORG)也有在\”解决Debian系统apt-get更新官方源失败 替换163源的方法\”也有类似的遇到过。我们只需要参考错误提示进行重新加载。

apt-key adv –recv-keys –keyserver keyserver.ubuntu.com AA8E81B4331F7F50

后面的序号对应上面的错误,如果多行就多行执行。

完毕之后,我们再去update更新即可。

看到已经没有报错,就这么可以解决问题。