The strike hit a detention center for mainly African migrants in a suburb of the Libyan capital Tripoli late on Tuesday.
It was the highest publicly reported toll from an airstrike or shelling since eastern forces under Khalifa Haftar launched a ground and aerial offensive three months ago to take Tripoli, the base of Libya's internationally recognized government, Presstv Reported.
Libya is one of the main departure points for African migrants, fleeing poverty and war, to try to reach Italy by boat, but many are picked up and brought back by the Libyan coast guard, supported by the European Union.
Thousands are held in government-run detention centers in what human rights groups and the United Nations say are often inhuman conditions.
The UNHCR refugee agency had already called in May for the Tajoura center, which holds 600 people, to be evacuated after a projectile landed less than 100 meters (330 feet) away, injuring two migrants.
The hangar-type detention center is next to a military camp, one of several in Tajoura, east of Tripoli's center, which have been targeted by airstrikes for weeks.
Frightened migrants were still at the detention center after the strike, which partially destroyed the hangar.