As long as we have enough energy, we can make fertilizers. Of course, petrochemicals are a nice raw material, but not necessary.
And we are not running out of energy, anytime soon. (Though we may run out of oil.)
If you wish to make an apple pie from scratch, you must first invent the universe - Carl Sagan
On the practical side: Using coal as a raw material, you should be able to make fertilizers with only somewhat more energy than from oil.
As long as we have enough energy, we can make fertilizers. Of course, petrochemicals are a nice raw material, but not necessary.
And we are not running out of energy, anytime soon. (Though we may run out of oil.)