With some investment you can make solar panels locally, you can't produce new oil deposits.

Isn't that what biofuels are?

Sun -> plants (corn) -> liquid that goes in (modified) cars

Sun (+ fertilizers made using petroleum)

EROI for them is really bad.