A 6.4-magnitude earthquake struck off the west coast of Indonesia’s Sumatra island on Wednesday, sending terrified residents fleeing from homes and buildings.