onsdag 25 mars 2015

Debian Wheezy - Spotify

Spotify for Linux

This is a preview build of Spotify for Linux. As a preview release this version is still unsupported, but we're running it ourselves and will try to make sure it keeps pace with its Mac and Windows siblings.
So how do you get it? We've packaged it for Debian Squeeze/Ubuntu.

Debian

# 1. Add this line to your list of repositories by
#    editing your /etc/apt/sources.list
deb http://repository.spotify.com stable non-free

# 2. If you want to verify the downloaded packages,
#    you will need to add our public key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 94558F59

# 3. Run apt-get update
sudo apt-get update

# 4. Install spotify!
sudo apt-get install spotify-client 
 
#--------------------------------------------------------------------------------------------
As of this writing the current release of Spotify for Linux is built for Debian Squeeze/Ubuntu. That package is dependant on the libssl0.9.8 while Debian Wheezy has the newer libssl1.0.0 installed. The easy way to fix this would be to install libssl0.9.8 system wide from the Squeeze repository, however I don't like the idea of installing an older package system wide just because Spotify is slow on updating their package for Wheezy. This guide will show you how I worked around this issue, adding libssl0.9.8 only for spotify.
First try to install Spotify using the guide on the Spotify homepage
When running the command:
sudo apt-get install spotify-client
It will complain about libssl0.9.8 not being installed. In order to install the client we need to ignore the dependency, first download the deb file:
apt-get download spotify-client
Then install some more dependencies and the deb file while ignoring libssl0.9.8:
sudo apt-get install libqt4-dbus libqt4-network libnspr4-0d
sudo dpkg --ignore-depends=libssl0.9.8 -i spotify-client_0.9.1.55.gbdd3b79.203-1_amd64.deb
Since we ignore a dependency to install Spotify we need to edit the file /var/lib/dpkg/status in order to be able to install new packages with apt-get, or else apt-get will complain that the dependency is not installed and that you should perform an apt-get -f install, which would remove Spotify since the dependency is not available in the Wheezy repository.
Open the file /var/lib/dpkg/status and search for spotify-client, under spotify-client find the depends: line and remove the libssl0.9.8 dependency.
So now we need to download libssl0.9.8 from the Debian package website
Since I don't want to install the package system wide I only want to extract the files from the package and move them to a suitable path using this command:
dpkg -x libssl0.9.8_0.9.8o-4squeeze14_amd64.deb /tmp/libssl0.9.8
sudo mv /tmp/libssl0.9.8/usr/lib /usr/share/spotify/libssl0.9.8
Then in order to start Spotify we need to tell Spotify where to look for the libssl0.9.8 library, this can be done with the LD_LIBRARY_PATH variable:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/share/spotify/libssl0.9.8 spotify
You can add the above command to a script in order to start Spotify easier:
1
2
3
4
#!/bin/bash

# Add libssl0.9.8 path
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/share/spotify/libssl0.9.8 spotify $1
I call the script spotify-starter and place the script in /usr/local/bin.
Remember to add execution permissions to the spotify-starter script
sudo chmod +x spotify-starter
Then I edit the Spotify desktop file /usr/share/applications/spotify.desktop and change Exec and TryExec to the following:
Exec=spotify-starter %U
TryExec=spotify-starter
Now you should be able to start Spotify either using the desktop shortcut or by running the spotify-starter script.
 
 
 
 
Skicka en kommentar