I get various and inconsistent errors with apt
on the official Ubuntu images (ami-83e769fb
). I'm using Packer to build my AMI and it fails about 40% of the time. Rerunning the script succeeds.
My script runs:
sudo apt-get clean all
sudo apt-get update
before install any packages.
Some times I get this error:
amazon-ebs: W: GPG error: http://archive.ubuntu.com/ubuntu artful InRelease: Splitting up /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_artful_InRelease into data and signature failed
amazon-ebs: E: The repository 'http://archive.ubuntu.com/ubuntu artful InRelease' is not signed.
Some times apt-get update
hits http://us-west-2.ec2.archive.ubuntu.com/ubuntu
... other times it doesn't.
Other times packages are missing (like apache2
or python3
).
I don't understand why this behaviour is inconsistent.
How can I get apt-get update
on the official Ubuntu AMI to work consistently?