# STEP19
# OPTIONAL: install Spotify Connect,
# using your DAC to listen music from Spotify
# More info on librespot
https://github.com/librespot-org/librespot
# More info on Spotify connect
https://support.spotify.com/us/article/spotify-connect/
# More info on Raspotify connect
https://dtcooper.github.io/raspotify/
# Install latest version of Raspotify on amd64, arm64 and armhf is very easy
# type the following command:
$ sudo apt-get -y install curl && curl -sL https://dtcooper.github.io/raspotify/install.sh | sh
# in case of error related to dependency like
curl : Depends: libcurl4 (= 7.74.0-1.3+deb11u7) but 7.88.1-1~bpo11+1 is to be installed
# install curl from backports
$ sudo apt-get -t bullseye-backports install curl
# then install pkg
$ sudo curl -sL https://dtcooper.github.io/raspotify/install.sh | sh
# #################################################################################
# Edit Raspotify configuration:
# #################################################################################
$ sudo nano /etc/raspotify/conf
LIBRESPOT_NAME="MusicLounge" LIBRESPOT_BITRATE="160" LIBRESPOT_DEVICE="plughw:1,0"
# CTRL+O to save
# CTRL+X to exit
$ sudo systemctl enable raspotify
$ sudo systemctl start raspotify
# check the status
$ sudo systemctl status raspotify
# Spotify Connect is now available!
# start a song, click the devices icon (bottom left) and choose MusicLounge.
# That’s it!
Click titles below to expand to install an old version of Raspotify.
# #################################################################################
# DEBIAN/UBUNTU AMD64 PLATFORM
# #################################################################################
# SKIP THIS TUTO and go next tutorial to learn how to install Raspotify on amd64 using Docker
# #################################################################################
# ATTENTION Raspotify Pkg Is For 32Bit Linux Distro Only, armhf platform
# #################################################################################
#
# install librespot (Raspotify) on Raspberry PI 4 with RaspiOS armhf (32Bit) is easy:
# install curl
$ sudo apt-get -y install curl apt-transport-https
# Add repo and its GPG key
$ curl -sSL https://dtcooper.github.io/raspotify/key.asc | sudo apt-key add -v -
$ echo 'deb https://dtcooper.github.io/raspotify raspotify main' | sudo tee /etc/apt/sources.list.d/raspotify.list
# Install pkg
$ sudo apt-get update
$ sudo apt-get -y install raspotify
# read below how to configure Raspotify
# on arm64 platform you can force installation of Raspotify 32 Bit pkg by using multi-arch
# applicable to Odroid C4 platform for example
# #################################################################################
# Force installation on Ubuntu arm64 (64Bit) using multi-arch
# add armhf platform
$ sudo dpkg --add-architecture armhf
# check if added
$ sudo dpkg --print-foreign-architectures
$ armhf
# update pkgs list
$ sudo apt update
# Install curl and https apt transport
$ sudo apt-get -y install curl apt-transport-https
# Add repo and its GPG key
$ curl -sSL https://dtcooper.github.io/raspotify/key.asc | sudo apt-key add -v -
$ echo 'deb https://dtcooper.github.io/raspotify raspotify main' | sudo tee /etc/apt/sources.list.d/raspotify.list
# edit sources list to target armhf platform
$ sudo nano /etc/apt/sources.list.d/raspotify.list
# change
deb https...
# by
deb [arch=armhf] https...
# Install pkgs list
$ sudo apt-get update
$ sudo apt-get -y install raspotify:armhf
# if your /var/log/syslog is fulfilled by deprecated …cp15_barrier
# add the following to any startup script like the good old /etc/rc.local
# if you are not too lazy then create a service it is better…
$ sudo nano /etc/rc.local
# add this line to deactivate the warning
sudo bash -c "echo 2 > /proc/sys/abi/cp15_barrier"
# CTRL+O to save
# CTRL+X to exit
# if for some reason this did not work on your Odroid C4 (arm64 platform) go next tutorial to install it with Docker
# to cleanup ALL previously installed armhf pkgs on arm64 platform
$ sudo apt --purge remove "*:armhf"
$ sudo apt autoremove
$ sudo reboot
# #################################################################################
# Edit Raspotify configuration:
# #################################################################################
$ sudo nano /etc/default/raspotify
DEVICE_NAME="MusicLounge" BITRATE="160" OPTIONS="--device plughw:1,0"
# CTRL+O to save
# CTRL+X to exit
$ sudo systemctl restart raspotify
# check the status
$ sudo systemctl status raspotify
# Spotify Connect is now available!
# start a song, click the devices icon (bottom left) and choose MusicLounge.
# That’s it!