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”?

相關內容