By mbigras
Running apt-get update -y fails with the following error message:
root@somehost:~# apt-get update -y
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
...
Ign:25 http://sfo1.mirrors.digitalocean.com/ubuntu xenial-updates/universe amd64 Packages
Get:25 http://sfo1.mirrors.digitalocean.com/ubuntu xenial-updates/universe amd64 Packages [759 kB]
Err:25 http://sfo1.mirrors.digitalocean.com/ubuntu xenial-updates/universe amd64 Packages
Hash Sum mismatch
Fetched 25.1 MB in 6s (3,638 kB/s)
Reading package lists... Done
E: Failed to fetch http://sfo1.mirrors.digitalocean.com/ubuntu/dists/xenial-updates/universe/binary-amd64/Packages.gz Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
What does this error mean? Where can I learn more? How do I solve this problem?
Steps to reproduce
curl \
-s \
-X POST \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $(lpass show --notes do_token)" \
-d "{\"name\":\"somehost.com\",\"region\":\"sfo2\",\"size\":\"512mb\",\"image\":\"ubuntu-16-04-x64\",\"ssh_keys\":[\"$(ssh-keygen -E md5 -lf id_rsa.pub | awk '{ gsub(/MD5:/, "", $2); print $2 }')\"]}" \
https://api.digitalocean.com/v2/droplets
# Recover IP Address of host
ssh -i id_rsa root@$IP apt-get update -y
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Did you by chance happen to try to do this again? I’m thinking there was an issue with the mirrors themselves. I had this very exact same problem on multiple droplets just running “sudo apt update” – but the issue seems to have been resolved for me.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.