由于 Err https://packages.cloud.google.com/apt kubernetes-xenial InRelease,do-release-upgrade 失败

由于 Err https://packages.cloud.google.com/apt kubernetes-xenial InRelease,do-release-upgrade 失败

我正在升级 Ubuntu 18.04 系统。命令sudo do-release-upgrade失败并显示以下错误。此系统是 k8s 主控,但我这样做了sudo apt purge kubeadm kubectl kubelet。为什么它仍在寻求升级 k8s?

  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05                        
Fetched 0 B in 0s (0 B/s)                                                                                                                  
Hit http://us.archive.ubuntu.com/ubuntu focal InRelease                                                                                    
Hit http://us.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                            
Hit http://us.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                          
Hit http://security.ubuntu.com/ubuntu focal-security InRelease                                                                             
Get:1 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8,993 B]                                                          
Hit https://apt.syncthing.net syncthing InRelease                                                                                          
Err https://packages.cloud.google.com/apt kubernetes-xenial InRelease                                                                      
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B53DC80D13EDEF05                        
Fetched 0 B in 0s (0 B/s)                                                                                                                  

Error during update 

A problem occurred during the update. This is usually some sort of 
network problem, please check your network connection and retry. 


Restoring original system state

Aborting
 

答案1

为什么还想升级k8s呢?

记住 apt 的工作原理:来自人类指定的来源

您删除了 k8s 软件包,但保留了 k8s 源。

因此,系统自然会寻找该来源。如果没有找到,就会向人类抛出错误。

您可以通过从 /etc/apt/sources.list.d/ 中的 apt 源中删除源来解决问题。或者,您也可以从“软件和更新”控制面板 -> 其他软件 -> 删除该源中删除源。

相关内容