Crashing on first time start up

It looks like Kodi uses ALSA on “dedicated” systems where it can safely control all audio, and “PulseAudio is used when Kodi is installed in a desktop-environment rather than a dedicated/direct boot setup. PulseAudio allows normal video & audio playback in XBMC while at the same time allowing the user to get audio in their browser or other applications.”

Do you still get the OSError: [Errno -9997] Invalid sample rate after you have PulseAudio running? If so you could try editing your asoundrc config file as described here: