Do you need liability insurance if you have comprehensive insurance?

Generally, you can't buy comprehensive without first buying liability coverage. Liability covers damage you do in an accident if it is your fault. Comprehensive will not even pay for your vehicle in an accident. It only covers fire, theft, vandalism, animal collision, etc.
Yes, you can't buy the comprehensive without the liability. No reputable agent would even try to sell it to you that way since the law specifically requires you have liability. The comprehensive is an option.