我有一个使用Vagrant实例化的Ubuntu 12.04虚拟盒虚拟机。
git clone https://github.com/spuder/puppet-gitlab
vagrant up
当无业游民框运行时apt-get update
,我得到以下错误。
...
W: Failed to fetch gzip:/var/lib/apt/lists/partial/apt.puppetlabs.com_dists_precise_main_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/apt.puppetlabs.com_dists_precise_main_binary-i386_Packages Hash Sum mismatch
W: Failed to fetch gzip:/var/lib/apt/lists/partial/apt.puppetlabs.com_dists_precise_dependencies_binary-i386_Packages Hash Sum mismatch
W: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-i386/Packages 404 Not Found
我尝试解决此错误的方法。
- 从' http://www.vagrantbox.es ' 使用了3个不同的ubuntu 12.04盒子
建议的解决方案在这里:
sudo rm -rf / var / lib / apt / lists / *
sudo apt-get更新
sudo apt-get clean删除并读取了puppet Labs程序包
我也尝试过在Google的前几页中找到的类似建议。我什至尝试了多台计算机和多个Internet连接。
这影响了多个Internet连接上的多个ubuntu vm,这一事实使我认为ubuntu回购有问题。
我还能如何尝试解决此问题?
更新资料
我尝试清除'/ var / lib / apt / lists / partial'并运行apt-get clean,然后使用此处建议的亚马逊镜像替换了/ etc / sources / list中的源:
我仍然收到类似的错误
Fetched 18.9 MB in 10s (1,865 kB/s)
W: Failed to fetch bzip2:/var/lib/apt/lists/partial/us-west-1.ec2.archive.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch bzip2:/var/lib/apt/lists/partial/us-west-1.ec2.archive.ubuntu.com_ubuntu_dists_precise_universe_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch bzip2:/var/lib/apt/lists/partial/us-west-1.ec2.archive.ubuntu.com_ubuntu_dists_precise_multiverse_binary-amd64_Packages Hash Sum mismatch
W: Failed to fetch bzip2:/var/lib/apt/lists/partial/us-west-1.ec2.archive.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
更新2
我家里有2个互联网连接,两个都给出了相同的错误。当我将笔记本电脑带到工作网络时,问题就消失了。
我仍然很想知道为什么我的互联网连接会有所作为。
更新3
请参阅下面的答案以获取解释。我的互联网过滤器破坏了下载。
由于没有答案,我将重新表述这个问题。
有没有办法在apt-get中覆盖哈希总和不匹配?