The attack happened early on Thursday while the interim leader was coming home.
The prime minister’s car’s windscreen was pierced by one of the bullets, but he and his driver were unharmed.
The bullets were fired from a light weapon, most likely a Kalashnikov, according to the sources.
According to the sources, Libya’s chief prosecutor has initiated an investigation.
The attack was also reported by one person close to the prime minister describing it as an assassination attempt.
The attack comes amid intense factional wrangling over the control of the government, with Dbeibah who was named interim leader last year pledging to fight efforts by his opponents to replace him.
Libya has had little peace or stability since the NATO-backed uprising against former leader Muammar Gaddafi in 2011. The country in 2014 split between warring factions in the east and the west.
Dbeibah, a powerful businessman from the city of Misrata, was installed as head of the United Nations-backed Government of National Unity (GNU) in March, and was tasked with leading the country to elections on December 24.
He was given the caretaker role on the condition that he not contest the election, but he declared himself a candidate in November in a move others called unfair.
The election was ultimately cancelled amid disputes between rival factions on laws governing the election, and the parliament, which mostly backed eastern forces during the country’s civil war, has declared the GNU invalid.
On Thursday, parliament members are scheduled to pick a new interim leader from between two candidates: powerful former interior minister Fathi Bashagha, 59, and outsider Khaled al-Bibass, 51, a former official in the interior ministry.
The vote could see a repeat of the 2014 schism which saw two parallel governments emerge.
Dbeibah earlier this week said he would resist any attempts by the parliament, which is based in the eastern city of Tobruk, to replace his Tripoli-based government.
“I will accept no new transitional phase or parallel authority,” he said, declaring that his government would only hand over power to “an elected government”.
The UN, Western powers, and even some members of parliament have called for Dbeibah to stay in his role until the election. A new date for the election is yet to be confirmed.