The death toll during clashes between the army and rebel forces near Tripoli, the capital of Libya, rose to 32.