COOK-2458

Fix to update the aptitude package cache and retry when an apt-get
install fails.