ACCRA, Ghana  President Obama told African countries on Friday that the legacy of colonialism was not an excuse for failing to build prosperous, democratic societies even as he leaned on the world’s richest nations to come up with billions of dollars more to feed the hungry.

Just hours before he arrived here to begin his first trip as president to sub-Saharan Africa, Mr. Obama made a personal appeal to other leaders of the Group of 8 powers meeting in L’Aquila, Italy, for larger donations to the aid effort, citing his own family’s experiences in Kenya. As a result, the initiative grew from $15 billion over three years, which was pledged coming into the summit meeting, to $20 billion.

At a news conference afterward, Mr. Obama said that when his father came to the United States, his home country of Kenya had an economy as large as that of South Korea per capita. Today, he noted, Kenya remains impoverished and politically unstable, while South Korea has become an economic powerhouse.

“There had been some talk about the legacies of colonialism and other policies by wealthier nations,” he said, “and without in any way diminishing that history, the point I made was that the South Korean government, working with the private sector and civil society, was able to create a set of institutions that provided transparency and accountability and efficiency that allowed for extraordinary economic progress, and that there was no reason why African countries could not do the same.”