Starting 9000 years ago and continuing until about 7000 years ago, Africa was a different place. The world was in what was called the "Atlantic Period" or Holocene climatic optimum.
This occurred because of a subtle change in the earth's axial tilt as it orbits around the sun in a cycle that repeats once every 26,000 years, called Milankovitch cycles after the Serbian engineer who discovered the phenomenon.
This is, generally speaking, an abstracted map I have created using available paleovegetation information, here is the present day:
And here is Africa 7000 years ago, including the gigantic lake that geologists call "Lake Mega Chad" and the rivers discovered by sattelites that used to drain into the Mediterranean.
Go back another 7000 years to 14,000 years ago and the situation is reversed, the climate is even drier than now, and both Lake Chad and even the Nile are gone. The Nile would not reappear for another 4000 years: