It is reported that ʿAbdullāh b. Al-Mubārak – Allāh have mercy on him – said:

The seeking of knowledge cannot truly be achieved except with four things: time (al-farāgh, being free to study), sufficient wealth (al-māl, to avoid preoccupation with seeking a living), preservation (al-ḥifẓ, memorization) and piety (al-waraʿ, religious cautiousness).

Al-Bayhaqī, Shuʿab Al-Īmān 3:243, article 1602.