North Africa underwent massive climate changes in the 4th and early 3rd millennia BCE as result of natural climate change. It had been a region of savanna land--scattered trees and grasses and some flowing rivers--much like those Sahelian areas to the south of the Sahara (even today), with much the same flora and fauna, as depicted on Saharan cave paintings. Yes, by the time of the Romans, it was a full-blown desert south of the north African coast, but the coast, at least around Carthage (present-day Tunisia) was producing a lot of grain.
It is thought (with research ongoing, especially by the Western Sahara Project in southwestern Algeria) that the resulting eastward migration of peoples fleeing the uneven desiccation of North Africa might have spurred the development of the first civilizations in the Nile River valley and Mesopotamia. Climate change caused migration which spurred the development of civilization (when the hydraulic civilizations developed from the control of water for irrigation which occurred as the result of governmental structures).
It is interesting to consider that the thinking behind why the pig became taboo in the diet of peoples in southwest Asia (the various Semites) is because (according to the school of Cultural Materialism) the pig is naturally a forest animal whose diet consists of forest substances, such as roots, tubers, acorns, nuts, grubs; thus it became destructive to the remaining forest ecology of southwest Asia as it desiccated. So, the best way to prevent the raising of pigs and save the land was to make pigs taboo, literally not what the gods say is "clean" to eat.
Those various peoples had centuries to adjust to the massive changes in regional climate by changing their diet, etc. I'm afraid that we today will not have much time (anyone ready to change your diet?). Many scientists are now thinking that we are facing massive climate changes that could occur almost like flipping a switch.
We have ample evidence of civilizations destroying their base ecology. Seems patently obvious we are doing the same. Is our civilization different so that we can forestall the worst?