Tried installing Rmagick tongiht on one of the ec2 instances and kept getting a bunch of errors like this:
Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/glib2.0/libglib2.0-0_2.16.3-1ubuntu3_i386.deb

The fix was to do sudo apt-get update then run the original command, and it worked

btw - the commands i used to install it:
sudo apt-get install imagemagick
sudo apt-get install libmagick9-dev
sudo gem install rmagick

taken from here, thx