The Catechism in Questions & Answers

299. How can the whole law be fulfilled?

The whole law could be fulfilled by loving God and one’s neighbour in perfect fashion (cf. Romans 13: 8, 10). This was only possible for Jesus Christ.

The law: see Questions 138., 271. et seq.