apt-get 未连接到存储库进行更新

apt-get 未连接到存储库进行更新

当我使用时sudo apt-get update,出现以下错误:

Err:1 http:/archive.ubuntu.com/ubuntu xenial InRelease
  Could not connect to localhost:4001 (127.0.0.1). - connect (111: Connection refused)
Err:2 http:/archive.ubuntu.com/ubuntu xenial-security InRelease
  Unable to connect to localhost:4001:
Err:3 http:/archive.ubuntu.com/ubuntu xenial-updates InRelease
  Unable to connect to localhost:4001:
Reading package lists... 4%
(process:2389): GLib-GIO-WARNING **: Invalid proxy URI 'http:/localhost:4001 ': Invalid URI 'http:/localhost:4001 '
Reading package lists... Done
W: Failed to fetch http:/archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Could not connect to localhost:4001 (127.0.0.1). - connect (111: Connection refused)
W: Failed to fetch http:/archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Unable to connect to localhost:4001:
W: Failed to fetch http:/archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Unable to connect to localhost:4001:
W: Some index files failed to download. They have been ignored, or old ones used instead.

我该如何修复此问题?

答案1

我认为您要么丢失了互联网连接,要么正在使用代理。要么您尝试更新的 ppa 已被弃用。

如果你使用代理,则此解决方案有效: 如何在命令行中通过代理运行“sudo apt-get update”?

相关内容