Language:
كتاب العلم
3  
Knowledge
(39)
Chapter: The writing of knowledge
(39)
باب كِتَابَةِ الْعِلْمِ
Sahih al-Bukhari 114

Narrated 'Ubaidullah bin `Abdullah:

Ibn `Abbas said, "When the ailment of the Prophet (ﷺ) became worse, he said, 'Bring for me (writing) paper and I will write for you a statement after which you will not go astray.' But `Umar said, 'The Prophet is seriously ill, and we have got Allah's Book with us and that is sufficient for us.' But the companions of the Prophet (ﷺ) differed about this and there was a hue and cry. On that the Prophet (ﷺ) said to them, 'Go away (and leave me alone). It is not right that you should quarrel in front of me." Ibn `Abbas came out saying, "It was most unfortunate (a great disaster) that Allah's Messenger (ﷺ) was prevented from writing that statement for them because of their disagreement and noise. (Note: It is apparent from this Hadith that Ibn `Abbas had witnessed the event and came out saying this statement. The truth is not so, for Ibn `Abbas used to say this statement on narrating the Hadith and he had not witnessed the event personally. See Fath Al-Bari Vol. 1, p.220 footnote.) (See Hadith No. 228, Vol. 4).

حَدَّثَنَا يَحْيَى بْنُ سُلَيْمَانَ، قَالَ حَدَّثَنِي ابْنُ وَهْبٍ، قَالَ أَخْبَرَنِي يُونُسُ، عَنِ ابْنِ شِهَابٍ، عَنْ عُبَيْدِ اللَّهِ بْنِ عَبْدِ اللَّهِ، عَنِ ابْنِ عَبَّاسٍ، قَالَ لَمَّا اشْتَدَّ بِالنَّبِيِّ صلى الله عليه وسلم وَجَعُهُ قَالَ ‏"‏ ائْتُونِي بِكِتَابٍ أَكْتُبُ لَكُمْ كِتَابًا لاَ تَضِلُّوا بَعْدَهُ ‏"‏‏.‏ قَالَ عُمَرُ إِنَّ النَّبِيَّ صلى الله عليه وسلم غَلَبَهُ الْوَجَعُ وَعِنْدَنَا كِتَابُ اللَّهِ حَسْبُنَا فَاخْتَلَفُوا وَكَثُرَ اللَّغَطُ‏.‏ قَالَ ‏"‏ قُومُوا عَنِّي، وَلاَ يَنْبَغِي عِنْدِي التَّنَازُعُ ‏"‏‏.‏ فَخَرَجَ ابْنُ عَبَّاسٍ يَقُولُ إِنَّ الرَّزِيَّةَ كُلَّ الرَّزِيَّةِ مَا حَالَ بَيْنَ رَسُولِ اللَّهِ صلى الله عليه وسلم وَبَيْنَ كِتَابِهِ‏.‏
Reference : Sahih al-Bukhari 114
In-book reference : Book 3, Hadith 56
USC-MSA web (English) reference : Vol. 1, Book 3, Hadith 114
  (deprecated numbering scheme)