In Vagrant file so I added this line
config.vm.provision :shell, :inline => "sed -i 's/archive.ubuntu.com/repos.del.extreme-ix.org/g' /etc/apt/sources.list"
What followed was an error with security.ubuntu.com
worker-1: Reading package lists...
worker-1: E
# -*- mode: ruby -*-
worker-1: :
worker-1: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/main/binary-amd64/by-hash/SHA256/c0dffd9d6d2e0cc74bd9a533a5464c936dfff08f19ba08aabd3fc0a307e2e3ea File has unexpected size (13247 != 592540). Mirror sync in progress? [IP: 91.189.88.174 80]
worker-1:
worker-1: Hashes of expected file:
worker-1:
worker-1: - Filesize:592540 [weak]
worker-1:
worker-1: - SHA256:c0dffd9d6d2e0cc74bd9a533a5464c936dfff08f19ba08aabd3fc0a307e2e3ea
worker-1:
So updated the Vagrantfile with this (I don't think it is recommended though to change the security.ubuntu.com repo url)
$script = <<-SCRIPT
sed -i 's/archive.ubuntu.com/repos.del.extreme-ix.org/g' /etc/apt/sources.list
sed -i 's/security.ubuntu.com/repos.del.extreme-ix.org/g' /etc/apt/sources.list
SCRIPT
config.vm.provision "shell", inline: $script
Now all works. Although I am not sure if this was the right fix.
Ran into this strange issue with mirrors today when setting up from scratch
I was receiving errors like these
The solution seems to be to use a mirror that is up to date. The up to date status can be checked here. https://launchpad.net/ubuntu/+archivemirrors
In my case since I am in India I found one that is up to date https://launchpad.net/ubuntu/+mirror/repos.del.extreme-ix.org+archive
For bionic64 the relevant sources.list entries are deb http://repos.del.extreme-ix.org/ubuntu/ bionic main deb-src http://repos.del.extreme-ix.org/ubuntu/ bionic main
In Vagrant file so I added this line config.vm.provision :shell, :inline => "sed -i 's/archive.ubuntu.com/repos.del.extreme-ix.org/g' /etc/apt/sources.list"
What followed was an error with security.ubuntu.com
So updated the Vagrantfile with this (I don't think it is recommended though to change the security.ubuntu.com repo url)
Now all works. Although I am not sure if this was the right fix.