torsdag 18. desember 2014

Installing spotify on kali linux and debian 64-bit

So you wanna have spotify on your linux ?


Do you also have trouble installing spotify on linux? I wrote this guide since I experienced a lot of problems taking hours every time I installed linux, and wanted spotify to work on it.

I think this will work on many different distros and versions, but I found spotify to work a lot easier on most though... but kali 64 bit was a bugger..

It works on my Kali linux 64-bit now :-) YEY!

if you are getting this error when trying to start spotify in a terminalwindow:

spotify: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by spotify)
spotify: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by /opt/spotify/spotify-client/Data/libcef.so)
spotify: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.15' not found (required by /opt/spotify/spotify-client/Data/libcef.so)

or you get the dreaded dependent on libssl0.9.8 erro...

... or spotify wont start when clicking spotifyicon

it most likely will work for you!


To make it work, you can follow these steps:
1. You must downgrade your spotify-client to version 0.9.4
2. you must download and install libssl-0-9-8.
3. you must edit your /var/lib/dpkg/status file and remove the libssl0.9.8 dependency
4. you must make a small script which direct spotify to use libssl0.9.8

Here is the recipe...
This took some long hours finding, so appreciate it :-)

Important note!
The solution where I ended with a working spotify, is based on an earlier version of spotify that uses glibc 1.13, but also uses libssl0.9.8, and as of today kali linux is on libssl1.0.0, so its not compatible(out of the box). So we got to download libssl0.9.8 by itself and only link to it with a spotifystarter script to make it work, and not install libssl0.9.8 system-wide, because it would break something else.

So here it is, its typed as I do it, and I wrote my thoughts...

I read this: https://community.spotify.com/t5/Help-Desktop-Linux-Mac-and/Spotify-0-9-10-for-GNU-Linux-Welcome-to-the-dark-side/td-p/556976/page/26

Aha, so I got to downgrade spotify to an earlier version...

testing: https://github.com/olejon/spotcommander/wiki/DowngradeSpotify

now this is the problem...

libssl could be a problem: http://askubuntu.com/questions/77256/i-want-to-install-libssl-0-9-8

if you already have installed a spotify-client:
uninstalling spotify:
sudo apt-get -y purge spotify-client

I download and use this version: Spotify 0.9.4 64-bit
as it was advised on the spotify-community, since its based on libssl0.9.8

found another nice guide...
trying this:
http://roger.steneteg.org/410/spotify-on-debian-wheezy/

So, I got to install install spotify-client, but it complains that its dependent on libssl...yack! Well, just ignore-depends then:

 sudo dpkg --ignore-depends=libssl0.9.8 -i spotify-client_0.9.4.183.g644e24e.428-1_amd64.deb






it installs, giving me:

(Reading database ... 437105 files and directories currently installed.)
Preparing to replace spotify-client 1:0.9.4.183.g644e24e.428-1 (using spotify-client_0.9.4.183.g644e24e.428-1_amd64.deb) ...
Unpacking replacement spotify-client ...
Setting up spotify-client (1:0.9.4.183.g644e24e.428-1) ...
Processing triggers for menu ...


Now install some libs, if needed:

sudo apt-get install libqt4-dbus libqt4-network libnspr4-0d

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.



Now we got to delete libssl0.9.8 from dependency in the dpkg status, like this:

Go to the /var/lib/dpkg folder, and open the status-file in write-mode:

root@kali:/var/lib/dpkg# vi status

command to search is the slash: /
write spotify-client and hit enter.

it will take you here in the file, now look for the libssl0.9.8:

....
Package: spotify-client
Status: install ok installed
Priority: extra
Section: sound
Installed-Size: 114456
Maintainer: Spotify <libspotify@spotify.com>
Architecture: amd64
Source: spotify
Version: 1:0.9.4.183.g644e24e.428-1
Replaces: spotify-client-gnome-support (<< 1:0.8.0), spotify-client-qt (<< 1:0.8.0)
Provides: spotify-client-gnome-support, spotify-client-qt
Depends: libasound2 (>= 1.0.14), libc6 (>= 2.6), libqt4-dbus (>= 4.5.0), libqtcore4 (>= 4.5.0), libqtgui4 (>= 4.5.0), libqt4-network (>= 4.5.0), libstdc++6 (>= 4.0.0), libxss1 (>= 1:1.2.0), usbutils, libnspr4-0d, libgconf2-4, libgtk2.0-0, libnss3-1d, libssl0.9.8, libglib2.0-0, xdg-utils (>= 1.0.2), dbus-x11, libudev0 | libudev1
Recommends: libavcodec53 | libavcodec52 | libavcodec-extra-53 | libavcodec-extra-52, libavformat53 | libavformat52 | libavformat-extra-53 | libavformat-extra-52
Conflicts: spotify-client-gnome-support (<< 1:0.8.0), spotify-client-qt (<< 1:0.8.0)
Description: Spotify desktop client
...


now edit the file using the insert-command(just press): i

and delete the libssl0.9.8, from the tekst. Don't forget the comma.

now with libssl0.9.8 removed, it should look like this:
...<snip>
libgtk2.0-0, libnss3-1d, libglib2.0-0, xdg-utils (>= 1.0.2), dbus-x11, libudev0 | libudev1 ....
</snip>


if using vi, here is commands to write and quit:
:w          to write the file
:q           to quit vi

So now we need to download libssl0.9.8 from the Debian package website http://packages.debian.org/squeeze/libssl0.9.8

now unpack it:

dpkg -x libssl0.9.8_0.9.8o-4squeeze14_amd64.deb /tmp/libssl0.9.8

and copy it to a logical folder/path:
sudo mv /tmp/libssl0.9.8/usr/lib /usr/share/spotify/libssl0.9.8

Your spotify now has to be directed to look for the libssl0.9.8 like this:

Make a small script file and name it something with spotify, ex. spotifystart, and add the lines below:
#!/bin/bash

# Add libssl0.9.8 path to the LD_LIBRARY_PATH variable:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/share/spotify/libssl0.9.8 spotify $1

then save the file.
 


Now edit/make your spotify icon/desktop-entry point to your script:

root@kali:/usr/share/applications# vi spotify.desktop

[Desktop Entry]
Name=Spotify
GenericName=Music Player
Comment=Listen to music using Spotify
Icon=spotify-client
Exec=spotify %U
TryExec=spotify

Terminal=false
Type=Application
Categories=Qt;Audio;Music;Player;AudioVideo
MimeType=x-scheme-handler/spotify


change the two lines to:
Exec=spotifystart %U
TryExec=spotify-start
 
Write the file 


And now for the finale....
trying it, running the startupscript:

nr1@kali:/usr/local/bin$ spotifystart

00:41:33.216 I [breakpad.cpp:107                ] Registered Breakpad for product: spotify

00:41:33.218 I [translate.cpp:140               ] Reloading language file
....

Hurra! it starts!

If this didnt work, let me know '-(

If it worked, let me know :-)

 

1 kommentar: