donderdag 1 november 2007

Skype on Debian Lenny AMD64 (testing; x86_64)

First I tried to install through the package manager:
apt-cache search skype

This didn't gave any result.

So I went to the skype website and looked for a debian package.
I found one, but it was for i386 architecture so installing it fails.
Still we can force it to install:
apt-get install --force-architecture skype-debian_1.4.0.118-1_i386.deb

Then I tried to run it but got an error saying that is missing:
skype: error while loading shared libraries: cannot open shared object file: No such file or directory

So I thought, I have an unmet dependecy, lets install libsigc package:
sudo apt-get install libsigc++-2.0-0c2a

Now I have the library but still the same error message so it seems that there is another problem.
After some googling I had an explanation why installing the libsigc package did not solve it: skype for i386 architecture needs the 32bit library, not the 64bit library.

Eventually I found a small script that solves these issues:

lib=`skype 2>&1 | awk '{print $7}' | cut -d':' -f1`
echo "lib: $lib" pkg=`dpkg -S $lib | awk '{print $1}' | cut -d':' -f1 | sort -u`
url=`wget -qO-$pkg/i386/download | awk '/ftp\.br\.debian\.org/' | cut -d'"' -f2`
file=`echo $url | awk '{n=split($0,a,"/"); print a[n]}'`
if [ ! -f deb/$file ]; then
wget -q $url
mv $file deb
ar -x deb
libfile=`tar ztf data.tar.gz | grep ${lib}$`
tar zxf data.tar.gz $libfile
sudo cp -d $libfile /usr/lib32/
if ls -l $libfile | grep -qF ' -> '; then
lnlib=`ls -l $libfile | awk '{print $10}' | cut -d':' -f1`
libfile2=`tar ztf data.tar.gz | grep ${lnlib}$`
tar zxf data.tar.gz $libfile2
sudo cp -d $libfile2 /usr/lib32/

Note that there is an error in the original script

Now after putting this into a file and making it executable:
chmod +x script

Lets run it:

Now you will see that each time you run it, another library dependancy get solved (libQtGui will change).
You have to RUN IT MULTIPLE TIMES (this is in CAPITALS for copy-paste people who don't read).

If skype starts, then all librarys are available. From now on you can use "skype" on the command line or launch it from your favorite desktop environment.

Have fun!

Powered by ScribeFire.

Geen opmerkingen: