pk-client-error-quark 和 apt-get 更新错误

pk-client-error-quark 和 apt-get 更新错误

如果我尝试更改“软件和更新”应用程序下载更新的服务器,我会收到以下错误:

pk-client-error-quark
E: archive.canonical.com/ubuntu focal
InRelease is not (yet) available (impossible connecting to archive.canonical.com:443 (91.189.91.15) - connection refused

sudo apt-get update返回一些错误:

$ sudo apt-get update 
Hit:2 https://packages.microsoft.com/repos/ms-teams stable InRelease           
Err:1 https://archive.canonical.com/ubuntu focal InRelease                     
  Could not connect to archive.canonical.com:443 (91.189.91.15). - connect (111: Connection refused)
Hit:3 https://mirror.bytemark.co.uk/ubuntu focal InRelease
Hit:4 https://mirror.bytemark.co.uk/ubuntu focal-updates InRelease
Hit:5 https://mirror.bytemark.co.uk/ubuntu focal-backports InRelease
Hit:6 https://mirror.bytemark.co.uk/ubuntu focal-security InRelease
Reading package lists... Done
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/focal/InRelease  Could not connect to archive.canonical.com:443 (91.189.91.15). - connect (111: Connection refused)
W: Some index files failed to download. They have been ignored, or old ones used instead.

这是怎么回事?我去过好几个国家,这可能把存储库搞乱了。

附加信息:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

答案1

显然,问题(或至少部分问题)在于页面上列出的一些官方支持的镜像Ubuntu 存档镜像确实没有Focal Fossa版本发布。

我编辑了/etc/apt/sources.list列表,只列出了那些确定有发行版的镜像(在我亲自检查之后),然后我sudo apt update --fix-missing && sudo apt upgrade。我想我还需要添加其他(更新的)镜像,但现在错误已经消失了:

$ sudo apt update --fix-missing && sudo apt upgrade
Hit:1 https://ubuntu.mirror.garr.it/ubuntu focal InRelease                     
Reading package lists... Done                            
Building dependency tree       
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

相关内容