If the resource is replaceable, like fossil fuels, the free market will invest appropriately in alternatives as and when needed. As for irreplaceable resources, it would be a very rare situation for there to only exist a few sources of it globally, controlled by a few entities, and for them to all stop competing and fix prices. This would be a global crisis requiring international action and co-operation for diplomacy, sanctions, and acquiring new sources/technologies. Clearly not a usual scenario that can be used to dismiss libertarianism.