On earth, all sorts of machines require heavy oils and lubricants in order to function correctly, be it bearing grease, engine oil, transmission fluid or hydraulic oil, the majority of which are produced from heavy petroleum fractions.
Most plastics, such as polyethylene, ABS, or PVC, are synthesized from materials that ultimately come from petroleum. Even when gasoline is no longer being burned for energy, oil and plastics are still needed.
While it's possible to synthesize fundamentally the same products from more basic raw materials, it's a lot more expensive to do it that way (although this is at least partially due to the way the demand for gasoline and diesel help subsidize the cost of fractions that might otherwise be unusable.)
If crude petroleum isn't available though, such as when colonizing a planet or mining asteroids in space, how would this be dealt with?