A door rough opening should be about 2" larger than the door. What is the door for, closet or room?? For a room, consider opening the RO to allow a larger door. For a 24" door you will have to add fillers to shrink the opening. Another possibility, bifold doors.