apt-get returns Not Found when using Amazon's AWS repositories

When I do sudo apt-get upgrade or update, I get the following:

Err http://security.ubuntu.com/ubuntu/ saucy-security/main apport all 2.12.5-0ubuntu2.1
  404  Not Found [IP: 91.189.91.15 80]
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy/main libwhoopsie0 amd64 0.2.24.1
  404  Not Found
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main software-properties-common all 0.92.28
  404  Not Found
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main python3-software-properties all 0.92.28
  404  Not Found
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/libd/libdrm/libdrm2_2.4.46-1ubuntu1_amd64.deb  404  Not Found
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/p/procps/libprocps0_3.3.3-2ubuntu9_amd64.deb  404  Not Found
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/s/systemd/udev_204-0ubuntu19_amd64.deb  404  Not Found
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_204-0ubuntu19_amd64.deb  404  Not Found
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/g/geoip/libgeoip1_1.5.1-1ubuntu1_amd64.deb  404  Not Found

I am running the latest Ubuntu 13.10in AWS. (the standard Ubuntu AIM when launch instance) I thought those errors were from older version of AWS.. I don't know why it appears in the latest ubuntu version. What should I do?


There could be two possible causes, given the information given. You are trying to install packages that are not on the repository (because they were deleted, moved, upgraded, or the specific version of Ubuntu isn't available anymore) or you haven't updated the package list in a while.

The first can be a temporal issue (try again later) or a permanent one. I recommend running apt-get update to make sure. If after you updated your package list the issue continues, it's probable that the repository is broken or that you need other repositories.

If it's the later you only need to remove us-east-1.ec2. from the url. That will return archive.ubuntu.com:

sudo sed -i 's/us-east-1\.ec2\.//g' /etc/apt/sources.list

That will leave you with only archives.ubuntu.com entries. With the former you can only wait.


Also, please make sure you update the mirror metadata -- sudo apt-get update -- before running an actual install. It sounds like your local apt cache is dated.