I would try Keith's suggestion of "yum clean all" first.  If that doesn't work, I have encountered a situation like this when there is actually an issue with the RPM database.

You can try to rebuild the RPM database by doing:


  sudo rm -f /var/lib/rpm/__db.* (you could move them to a temporary directory to be cautious)
  
  sudo /bin/rpm --rebuilddb


After that completes, try the "yum install squid" again.

yum hangs on installing a specific package
According to this question freshwater fish should not be used in Ceviche--why not?
