Note the contact details for the Canadian Embassy in Libya. If you are an expat then you can speak to the embassy about consular assistance if you are in trouble. Note that the Canadian Embassy has made it clear that you need to avoid non-essential travel to Libya due to the fragile political situation and the threat of terrorism in the region.
Update: The Canadian advises against all travel to Libya due to the fragile and unpredictable political situation and the threat of terrorism in the region. Given the volatile security situation, the Canadian embassy in Tripoli has suspended operations until further notice. Canadian officials have left the country. The Canadian Embassy in Libya is currently closed, but will continue to operate remotely from the Canadian Embassy in Tunisia.
See the other diplomatic missions in the area. These include but not limited to the Canadian High Commission in Rwanda or the Canadian Consulate in Uganda. As well as the Canadian High Commission in Ghana. Search this website for more information. You can also see the Canadian visa options on this website.