In Africa borders between countries were drawn up with little regard for ethnic realities, which made development of a national consciousness difficult. Of course, the colonizing powers really did not want that to develop. The more benign colonizers did make efforts to install things like a decent legal system (although two tier), did have some level of education/training, and some physical infrastructure. For a variety of reasons after WWII the colonial powers decided it was time to go (physically forced out, unwilling to pay to stay, or whatever) and basically walked away, tossing the keys to the locals on the way out. There was very little if any serious effort for a transition. Since prior to WWII there were really no plans for the colonial powers to leave and have their erstwhile colonies self governing, you simply did not have the conditions for things to hold together. You did not have enough educated trained folks to keep the wheels turning, there had been ceilings on how high locals could get whether on the shop floor or in public services (courts etc). Africans are no more or less intelligent and capable than anyone else, however absent education/training it doesn't work - you can't have someone with practical nurse training all of a sudden told to do major surgery on their own, or a court clerk promoted to district judge because the superstructure of the system is gone. This is true all up and down the chain. If you had a company and all of a sudden basically all of upper and most of middle management left, and on the shop floor the supervisors and QA folks left abruptly, what do you think would happen??
Had the plan of the colonizers been to develop these colonies to a place where locals would be co-equals in running things, even as part of the "empire" or if when they decided to leave they simply did not walk away, things would have been different. While not perfect, the Roman Empire was so successful in part because if you were a Roman Citizen, that made you a more or less equal part of the system. Sure there were class differences, and levels of prejudice, but citizens were citizens. In colonial Africa, the locals were never so considered.