On installing Raspotify on a new build of Ubuntu 19.10 for Raspberry Pi I saw the following error:

Raspotify installer only runs on a Raspberry Pi

Not too much information there. Going through the manual install procedure you end up something more meaningful:

N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'https://dtcooper.github.io/raspotify raspotify InRelease' doesn't support architecture 'arm64'

So unpacking that a bit it seems that in switching to using Ubuntu Server from Raspbian on my Linux Spotify connect Raspberry Pi’s the architecture is ARM64 (ARMv8) rather than using armhf. Unfortunately raspotify is built for Raspbian which at least at the time of writing is 32bit/armhf only. Obviously you can switch back to a distribution that supports 32bit/armhf. However with an eye on the future one solution to this is to use multiarch. This enables you to run different architectures concurrently e.g. 32bit and 64bit. To begin make sure you are running ARM64:

dpkg --print-architecture

So now add armhf to our current install:

sudo dpkg --add-architecture armhf

Now the system should support armhf packages. We can check this via:

dpkg --print-foreign-architectures

Which should report:

Run a quick update:

sudo apt update

At this point we want to manually install the Raspotify deb file:

wget https://dtcooper.github.io/raspotify/raspotify-latest.deb

Install the deb:

sudo dpkg -i raspotify-latest.deb

Which results in a dependency error:

dpkg: dependency problems prevent configuration of raspotify:armhf:
 raspotify:armhf depends on libasound2

Add the missing package:

sudo apt install libasound2

Which also errors but running the fix sorts out the issues

apt --fix-broken install

Install the deb which should complete without errors:

sudo dpkg -i raspotify-latest.deb

Now that is looking better we can follow the Raspotify install guide or to install Raspotify manually:

At this point everything should be installed and Raspotify should be working. Edit the config file to suit your needs:

sudo nano /etc/default/raspotify

In my case this that is adding the Spotify logon details and the device details for my Hifiberry DAC+:

BITRATE="320"
OPTIONS="--username whatever --password whatever --device plughw:CARD=sndrpihifiberry"

Replacing whatever with your details. Another nice package to have is alsamixer which can be installed from:

sudo apt install alsa-utils

For my Hifiberry DAC+ it looks like:

At this point you should be running a ARM64 based system which has the ability to install armhf packages. There may be issues through package dependancies and the two architectures so make sure you do all your testing on a spare SD card. For my simple Spotify connect endpoint setup everything seems to work and is stable, currently it is playing:

More information

Raspotify install guide

Ubuntu blog

64bit Ubuntu Server for the Raspberry Pi