Hi Fahim,
I hope you are enjoying good time in Libya. Dude you need visa to visit Turkey. Before, Pakistani citizen gets visa on arrival but now you need visa prior. But it is better to speak with Turkish Embassy in Tripoli.
Hey by the way Libya is great place to visit you may find many places like Sabrata, Leptus, Green Mountains and Ancient Roman architect. So let the things get settle down you will find Oasis in sahra 
Take care bro
Riz