Spotify on an RPM based system (64 bits)

I recently registered with Spotify and wanted to listen to it on Linux. They have a preview client for Debian but nothing for RPM based systems. Funnily enough, they have an app for Android. This is a quick and dirty guide to get it running on CentOS/RHEL systems. You will need a PREMIUM subscription for this to work.

First, credits where they are due, I looked at this post on the community site. You need a Debian based system to convert the RPM or you will have to install alien yourself. Once this is done, go to the repository and grab the latest DEB for your platform. Then convert this (as root)

alien --to-rpm spotify-client_0.8.4.103.g9cb177b.260-1_amd64.deb

You then obtain an RPM you can install, you will need to install it the dirty way with nodeps. You also need to install a few dependencies:

yum install openssl098e qtwebkit
rpm -ivh --nodeps spotify-client-0.8.4.103.g9cb177b.260-2.x86_64.rpm

Now running the first next command will show you that a few libs are not in the right location, this is how to fix it on RHEL 6.3, other RPM based systems might require different lib names:

ldd -v /usr/bin/spotify |grep "not found"
ln -s /usr/lib64/libssl.so.0.9.8e /usr/lib64/libssl.so.0.9.8
ln -s /usr/lib64/libcrypto.so.0.9.8e /usr/lib64/libcrypto.so.0.9.8
ln -s /usr/lib64/libnss3.so /usr/lib64/libnss3.so.1d
ln -s /usr/lib64/libnssutil3.so /usr/lib64/libnssutil3.so.1d
ln -s /lib64/libplc4.so /usr/lib64/libplc4.so.0d
ln -s /lib64/libnspr4.so /usr/lib64/libnspr4.so.0d

All going well, the client should now have all the libs linked properly. You can then launch spotify and profit!

I think this is worth mentioning that this is a temporary fix as I believe official clients will eventually show up.