2006 Chevrolet Silverado 1500

Intermittantly the check engine light will come on and the check gas cap loose . It will stay on for about as long as the weather is above 88 and then it seems fine. What can I do to keep the light from coming on. Is there and update to the computer?