Wednesday, May 23, 2012

Running Spotify on Fedora 16

Huzzah! There's a Linux version of the famous music software Spotify. However installing it on your distribution of choice might not be as easy as it sounds.

At the moment there are only packages for Debian and Ubuntu. Though there are a few "hacked" version circling around. Here I'll describe how to do it yourself.

Note that the Linux version doesn't support free accounts atm.
The following guide assumes you are using the terminal as root, use
$ su root
to switch or use "sudo" if you have set it up.
If you're using the 32bit version some file locations may vary. Use the "locate" command to find the files you need and make sure to download the correct versions for your architecture when using the download links in this guide.

  • Step 1: Download "Alien". It's a piece of software we will use to convert the debian package of spotify into a rpm package for fedora 16.
    You can download the latest version here. If the "unstable" label frightens you you can try it with the latest stable version here, though I haven't tried it and don't know if it will work.
    The reason I went with the latest "unstable" release was because that was the one linked from the Alien website.
     
  • As Alien also is available only for Debian (sigh) we will have to start by compiling it. First, unpack the tarball you just downloaded (to download through console use wget):

    $ tar -zxvf alien*

    (If you have more than one file in that location starting with "alien" you might want to type the full filename.)
    Now, browse to the folder with the unpacked files. If you type:

    $ cat INSTALL

    You will see the command for installing Alien. However, if you haven't got the necessary libraries it will simply give you an error stating such. To install these type:

    $ yum install perl-Ext-Utils*
  • Now it's time to download spotify. Go to:

    http://repository.spotify.com/pool/non-free/s/spotify/

    Download the version for your architecture (i386 for 32bit and amd64 for 64bit). The file should be around 30MB.
  • Now we'll need something called "rpm-build" in order to successfully convert the .deb package to .rpm. We install it with:

    $ yum install rpm-build
  • Now we can convert the package! Run:

    $ alien -r spotify*.deb

    Again, if you have multiple files in that folder starting with "spotify" you might want to type the full filename.
  • Install the converted package with:

    $ rpm -ivh spotify*.rpm --nodeps
  • Almost there! Now we just need to create some "symlinks" for Spotify to correctly find some of your libraries. I found an excellent tutorial on how to do this for RHEL 6 here. I modified it slightly for Fedora 16 so type the following commands:

    $ ln -s /usr/lib64/libnss3.so /usr/lib64/libnss3.so.1d
    $ ln -s /usr/lib64/libnssutil3.so /usr/lib64/libnssutil3.so.1d
    $ ln -s /usr/lib64/libsmime3.so /usr/lib64/libsmime3.so.1d
    $ ln -s /lib64/libplc4.so /lib64/libplc4.so.0d
    $ ln -s /lib64/libnspr4.so /lib64/libnspr4.so.0d
  • Now run Spotify (not as root - for some reason that makes it complain about the process already running).
  • If for some reason songs won't play try rebooting your machine. I had this problem at first and am not sure what finally solved it.
That's it, GLHF!

No comments:

Post a Comment