Five of those killed in the explosion were soldiers, and two were civilians, army officials said.
In a separate incident in Benghazi, a rocket hit a residential building, killing a 17-year old girl and another person, and wounded three others, medics said.
It was unclear who fired the rocket.