Since the 1920's, we've known how to synthesize linear hydrocarbons such as gasoline and diesel from a mixture of carbon monoxide and hydrogen gases called syngas. WWII Germany made their airplane fuel this way when they were cut off from world oil supplies. South Africa made their diesel this way when embargoed. The US currently mixes their high sulfur diesel with synthetic diesel to meet federal ultra low sulfur requirements. The very heaviest bitumen from the Alberta tar sands are gasified into syngas and synthesized into a synthetic crude. We normally get the syngas by gasifying natural gas, coal or bitumin in the tar sands upgraders but it can be produced by gasifying biomass ( which is actually done when making cellulosic ethanol through the thermochemical process ) or with energy, it can be made directly from CO2 and H2O as Sandia Labs have done.
Hence, so long as we have some form of power, we can still operate gasoline and diesel engines on synthetic fuels. Indeed gasoline and diesel are just chemically stored energy, ancient solar energy in terms of fossil fuels, but really they are no different from batteries except they are better.
But where would all this energy be from? Well, fundamentally thousands of times more power falls on Earth from the Sun then we use in total, 174 petawatts fall on Earth and we only use 15 terawatts. But solar energy is difficult and expensive to collect. However, we have safe, reliable power in Liquid Fluoride Thorium Reactors that are nuclear reactors which do not explode, do not leak, do not melt down, do not need power to shut down, do not need power to stay shut down and consumes our existing nuclear wastes. There's enough Thorium for thousands of years if not indefinitely.
From technology's point of view, there is no energy crisis but it is a problem of economic, political and people's perceptions of technology. The environmental crisis is also not an issue from technologies standpoint, the gasification of biomass to produce synthetic fuels produces charcoal as a byproduct which when used as biochar sequesters the carbon indefinitely. Existing gasoline and diesel cars could actually remove CO2 from the air if we just change how we make the fuel. The environmental crisis is purely the result of economic, political concerns and the limited knowledge of the public.
We would not run out of power, we would just run out on our current conventions.