Singleton-optimal LRCs with length n > q + 1 and minimum distance d ≥ 5. On the other hand, an LRC acheiving the Hamming-type bound is called a perfect LRC. By using cyclic and constacyclic codes, we construct two new families of q-ary perfect LRCs with length n = q m −1 q−1 , minimum distance d = 5 and locality r = 2.