Here's one way to do it. Morocco spends $3B yr on fossil fuel.
Divert some of that expense to (non-nuclear/coal/gas) solar.
The dates are fuzzy, but the plan is there.
Target is 42% renewable by what I think should be 2030.
Energy powers the economies of all nations. The two are virtually equal, have a direct relationship and cannot hardly be separated.
My feeling is that it will be far easier to convert developing nations to nonfossil.
Their demands are relatively low.
Fossil fuels will get more expensive and they require foreign reserve currency to pay for them.
Their existing power providers are relatively small.
Existing providers are not as organised to prevent or monopolise solar as developed country power providers do.
Vast areas of countries have no or minimal service and are wide open.
No long hard wires or pipeline networks are necessary.
Converting existing users is much more difficult than bringing power to green field users.
In certain countries and regions, its difficult to build even the smallest refinery, because demands are so low and construction costs so high, plus oil might still have to be imported. Kenya had one refinery, for refining imported oil, but its been mothballed for years. Local potential supplies are minimal, roads poor, pipelines expensive, demand is small. Solar, geothermal and wind suit the country's needs. Importing gasoline and diesel is very expensive.
Surely the problems will be worse with converting the infrastructure of existing technology customers.