The channel said the soldiers had been protesting against the "non-payment of their salaries for months."
The troops were not armed but forced their way into the building, preventing anyone else from entering or leaving, Alnabaa reported.
"They say that they are waiting for an official to negotiate with," the broadcaster said.
Prime Minister Ali Zeidan was not present when the incident took place, as he started a three-day state visit to Morocco on Sunday.
The headquarters of the prime minister and the interim government has often been the scene of protests demanding unpaid wages by former rebels who helped overthrow dictator Moamer Kadhafi in 2011.
In April and May, groups of ex-rebels laid siege to the justice and foreign ministries in Tripoli for nearly two weeks, demanding a law be passed excluding officials from the Kadhafi regime from office.
When Kadhafi was overthrown and killed in 2011, the rebels were hailed as heroes for bringing an end to more than four decades of dictatorship.
But since then, they have formed militias with different ideologies and motivations. Today they stand accused of many of the country's ills, notably the instability that still plagues parts of the North African nation.
Many of the militias have refused the government's demands that they hand over their weapons or join the national security forces, and a patchwork of armed groups effectively control much of the country.
NJF/NJF