Skip to main content
1 of 5
spuder
  • 18.6k
  • 37
  • 94
  • 122

How do you fix apt-get update "Hash Sum mismatch"

I have an Ubuntu 12.04 virtual box vm that I instantiate using Vagrant.

git clone https://github.com/spuder/puppet-gitlab
vagrant up

As soon as the vagrant box runs apt-get update, I get the following error.

...
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

Things I've tried to work around this error.

  • Used 3 different ubuntu 12.04 boxes from 'http://www.vagrantbox.es'

  • solution suggested here:

    sudo rm -rf /var/lib/apt/lists/*
    sudo apt-get update
    sudo apt-get clean

  • Removed and readded the puppet labs packages

I've also tried similar suggestions that I've found in the first few pages of google. I've even tried multiple computers, and multiple internet connections.

The fact that this has affected multiple ubuntu vm's on multiple internet connections makes me think there is something wrong with the ubuntu repo.

How else can I try to fix this issue?

spuder
  • 18.6k
  • 37
  • 94
  • 122