Abdullah bin Umar reported,

"Is the practice of the Messenger of Allah ﷺ not enough for you? If any of you is prevented from completing the Hajj, he should perform tawaf around the Kaaba and walk between Safa and Marwa, then leave the state of ihram completely, and perform Hajj the following year, offering a sacrificial animal, or fasting if he cannot find one to offer."

Azami 4757

Sahih

عن ابن عمر، قال

أليس حسبكم سنة رسول الله ﷺ إن حبس أحدكم عن الحج طاف بالبيت وبالصفا والمروة ثم حل من كل شيء حتى يحج عاما قابلا، فيهدي أو يصوم إن لم يجد هديا.

الأعظمي 4757صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Hajj
Chapter
Obligation of Hajj, its virtue, and its conditions
Section
Fasting for one who is prevented from completing pilgrimage when he cannot find a sacrificial animal
Numbering
Jami al-Kamil 4757 (2nd edition)
Azami 4757