This is usually due to dirt and debris buildup on the switch contacts for the Park gear. The buildup prevents the car from engaging the gear, which is necessary when you want to leave the car hence the warning. Try putting the shifter in Park and wiggle it. If it still won't engage, then cleaning or replacing the switch is necessary. Certain Malibu models are eligible for a recall.