错误:使用 apt-get 与合作伙伴 repo 时超时

错误:使用 apt-get 与合作伙伴 repo 时超时

有人可以帮助/分享他们的知识,关于如何解决超时错误吗?我发现这个错误大多在每次 apt-get 操作后出现。

例1:

sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu jammy InReleaseHit:2 http://archive.canonical.com/ubuntu jammy InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Error: Timeout was reached
Reading package lists... Done

例2:

sudo apt autoremove 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  docbook-xml libglu1-mesa libopengl0 libpipeline1 libyelp0 sgml-base
  sgml-data x11-session-utils xbitmaps xinit xml-core yelp-xsl
0 upgraded, 0 newly installed, 12 to remove and 5 not upgraded.
After this operation, 6,795 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 211270 files and directories currently installed.)
Removing docbook-xml (4.5-11) ...
Removing libglu1-mesa:amd64 (9.0.2-1) ...
Removing libopengl0:amd64 (1.4.0-1) ...
Removing libpipeline1:amd64 (1.5.5-1) ...
Removing libyelp0:amd64 (42.1-1) ...
Removing sgml-data (2.0.11+nmu1) ...
Removing xml-core (0.18+nmu1) ...
Removing sgml-base (1.30) ...
Removing x11-session-utils (7.7+4build2) ...
Removing xbitmaps (1.1.1-2.1ubuntu1) ...
Removing xinit (1.4.1-0ubuntu4) ...
Removing yelp-xsl (42.0-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Error: Timeout was reached

我的 sources.list 有:

deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse

deb http://archive.canonical.com/ubuntu/ jammy partner
# deb-src http://archive.canonical.com/ubuntu/ jammy partner

答案1

您需要从中删除合作伙伴档案sources.list因为这已被弃用

因此注释掉该行:

# deb http://archive.canonical.com/ubuntu/ jammy partner
# deb-src http://archive.canonical.com/ubuntu/ jammy partner

那么它应该对你有用。

相关内容