An earthquake with a magnitude of 7.5 struck northern Peru on Sunday, damaging buildings and blocking roads.