This Hadeeth has been narrated in many wordings but with the same meaning. This called Tawaatur Ma'nawi تواتر معنوي.
In Saheeh Muslim , V. 6, P. 22 Kitab al-Imaarah : Who dies without allegiance in his neck, will die a death of Jahiliyyah.
In Musnad Ahmed Ibn Hanbal , V. 4, P. 96: Who dies with out Imam, will die a death of Jahiliyyah.
In Kitab al-Sunnah by Ibn Abi 'Aassim , P. 489: Who dies with out Imam on him will die a death of Jahiliyyah.
The Hadeeth is also narrated in the most authentic Shia books of Hadeeth like al-Kaafi, V.1, P.276 and in many other books. It means that the meaning of this Hadeeth is Ijmaa' (unanimous) between all Muslims.