He made his comments as he started a two-nation visit to sub-Saharan Africa.
This is the third visit to the region by Scholz in two years and comes as conflicts elsewhere highlight the growing importance of an energy-rich region in which Berlin has traditionally had little involvement.
"There is a willingness to invest, especially in critical minerals," Scholz told reporters at a joint briefing with Nigerian President Bola Tinubu in the capital Abuja. On gas, he welcomed Nigeria's efforts to expand its LNG capacity.
"If we are successful, if there is a better chance of exporting the produced gas ... it is then the question for German companies to do their private business," said Scholz. Tinubu said he had "a very deep discussion" on the issue of
gas and encouraged German businesses to invest in pipelines in Nigeria.
Nigeria is also seeking to woo investors to its mining sector, which has long been underdeveloped, contributing less than 1% to the country's gross domestic product.
Without giving details, Scholz said there was also a willingness from German companies to build railways in Nigeria. That sector is currently dominated by Chinese companies, which have won contracts to expand rail lines in Africa's biggest economy.
Scholz also met the president of the commission of West African regional group ECOWAS and said it was necessary to work
with the bloc "to prevent that putsches will become a trend" following recent military coups in Niger and Gabon.
Forum