Images posted online showed thick columns of smoke as the demonstrators burned tyres outside.
There have been rallies in other Libyan cities against continuing power cuts, rising prices and political deadlock.
In the capital, Tripoli, where a rival administration holds sway, protesters called for elections.
Their demand was backed by the head of the interim unity government, Abdul Hamid Dbeibah, who said all the country’s institutions needed to be changed.
The unrest comes a day after United Nations-brokered talks in Geneva aimed at paving the way for a ballot ended with little progress.
Libya has been in chaos since the Nato-backed uprising in 2011 that ousted long-serving ruler Col Muammar Gaddafi.
The oil-rich country, a key departure point for some of the thousands of migrants travelling to Europe, once had one of the highest standards of living in Africa, with free healthcare and free education.
But the stability that led to its prosperity has been shattered and Tripoli has seen frequent fighting between rival forces.