The terms of your contract should specify the process and limits for repairs identified during the home inspection. As mentioned, unless the roof is leaking, it is generally understood the roof does not require replacing.
Most inspectors are not experts in every faction of the inspection. Based on this, if there is a problem with the roof, we recommend bringing in a licensed and insured roofing expert for a professional evaluation. Be sure you get a written report. Be certain to ask, "How many years the roof hav left before it needs to be replaced?"
If the answer to this is, it needs to be replaced NOW, you need to take this information back to the seller and negotiate a solution that is satisfactory to both parties.