sudo apt-get install php5-imagick 

failed, and produced output including this in the middle:

Get:7 http://us.archive.ubuntu.com/ubuntu/ trusty/main libavahi-common3 amd64 0.6.31-4ubuntu1 [21.7 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ trusty/main libavahi-client3 amd64 0.6.31-4ubuntu1 [25.1 kB]
Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libcups2 amd64 1.7.2-0ubuntu1.1
  404  Not Found [IP: 80]
Get:9 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libcupsfilters1 amd64 1.0.52-0ubuntu1.2 [74.4 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu/ trusty/main libfftw3-double3 amd64 3.3.3-7ubuntu3 [702 kB]
Err http://security.ubuntu.com/ubuntu/ trusty-security/main libcups2 amd64 1.7.2-0ubuntu1.1
  404  Not Found [IP: 80]
Err http://security.ubuntu.com/ubuntu/ trusty-security/main libcupsimage2 amd64 1.7.2-0ubuntu1.1
  404  Not Found [IP: 80]
Get:11 http://us.archive.ubuntu.com/ubuntu/ trusty/main libjasper1 amd64 1.900.1-14ubuntu3 [129 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu/ trusty/main liblcms2-2 amd64 2.5-0ubuntu4 [132 kB]

and this at the end (referring to the same errors):

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/cups/libcups2_1.7.2-0ubuntu1.1_amd64.deb  404  Not Found [IP: 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/cups/libcupsimage2_1.7.2-0ubuntu1.1_amd64.deb  404  Not Found [IP: 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Other questions were near duplicates but had different error messages and very complicated solutions, so it seemed sensible to post this question and answer to try to keep things simple.

In my case, it was resolved by simply running:

sudo apt-get update

Hopefully others will find it's as simple as this too :-)

Not the answer you're looking for? Browse other questions tagged or ask your own question.