Reputation: 6765
I've set up a vagrant machine on my mac using the following commands -
vagrant init ubuntu/trusty64
vagrant up
Now I've sshed successfully into the machine using vagrant ssh
and trying to use sudo apt-get update
, which fails with the following error -
W: GPG error: http://archive.ubuntu.com trusty Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <[email protected]>
I've tried cleaning my apt cache and removing the /var/lib/apt/lists
dir. I've also tried running the following command -
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
When I do the error changes to -
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/main/source/Sources Hash Sum mismatch
And when I clean my cache the original error returns.
What can I do to resolve this?
Upvotes: 1
Views: 4552
Reputation: 1331
What version of the base box do you have (ubuntu/trust64
)? When I follow the steps you took, I get a little warning:
==> default: A newer version of the box 'ubuntu/trusty64' is available! You currently
==> default: have version '20151119.0.0'. The latest is version '20160323.0.0'. Run
==> default: `vagrant box update` to update.
Have you tried running vagrant box update
?
I followed your steps and was able to ssh and sudo apt-get update
without any errors on this box.
Upvotes: 2