squid 干扰了 apt-get?

squid 干扰了 apt-get?

我最近安装了 squid 和 Dan's Guardian。自从我安装并运行它们以来,每次尝试运行 apt-get update 时都会出现错误。错误如下所示:
W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_source_Sources Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-updates_multiverse_source_Sources Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_binary-amd64_Packages Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-updates_multiverse_binary-amd64_Packages Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-updates_restricted_binary-i386_Packages Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-updates_multiverse_binary-i386_Packages Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-security_restricted_source_Sources Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-security_universe_source_Sources Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-security_multiverse_source_Sources Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-security_restricted_binary-amd64_Packages Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-security_multiverse_binary-amd64_Packages Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-security_restricted_binary-i386_Packages Hash Sum mismatch W: Failed to fetch gzip:/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_trusty-security_multiverse_binary-i386_Packages Hash Sum mismatch

我运行的是 ubuntu 14.04。有人知道如何修复这个问题吗?`

答案1

那么,您仍然有直接的互联网连接,还是只能通过 Squid?Apt-get 需要配置才能通过代理以及任何其他软件工作。在 /etc/apt/apt.conf 中添加

Acquire::http::Proxy "MYDOMAIN\MYNAME:[email protected]:MYPORT"

答案2

我发现了类似的东西,运行这个代码对我有用:
export {http_proxy,https_proxy,ftp_proxy}="http://127.0.0.1:3128"

相关内容