When did countries in north africa start to gain independence?

Which country are you referring to?

Algeria:In 1954, the National Liberation Front (FLN) launched the Algerian War of Independence which was a guerrilla campaign. By the end of the war, newly elected President Charles de Gaulle, understanding that the age of empire was ending, held a plebiscite, offering Algerians three options. This resulted in an overwhelming vote for complete independence from the French Colonial Empire. Over one million people, 10% of the population, then fled the country for France in just a few months in mid-1962. These included most of the 1,025,000 Pieds-Noirs, as well as 81,000 Harkis (pro-French Algerians serving in the French Army).[9]

Libya:On November 21, 1949, the UN General Assembly passed a resolution stating that Libya should become independent before January 1, 1952. Idris represented Libya in the subsequent UN negotiations. On December 24, 1951, Libya declared its independence as the United Kingdom of Libya, a constitutional and hereditary monarchy under King Idris.