I installed Skype from here using the package for Ubuntu 12.04 Multiarch. When I ran Skype from the Dash, nothing happened. When I ran Skype from the shell, I found that it quit with this error:
$ skype skype: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
- Let us check the shared library dependencies of this Skype executable. This actually uses the dynamic linker and loader to compare what is required by the executable with what shared libraries are available in the cache:
$ ldd /usr/bin/skype | grep libGL libGL.so.1 => not found libGL.so.1 => not found
So yes, the shared library file is not found.
- I first checked if the
libGL.so.1was available in the shared library cache:
$ ldconfig -p | grep libGL.so.1 libGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
So, a 64-bit shared library of the required name was present in the cache!
- I next checked the Skype program itself:
$ file /usr/bin/skype /usr/bin/skype: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, stripped
This was a 32-bit executable. Might it require a 32-bit shared library and could this be causing the problem?
- The 32-bit GL library files and directories updated in cache are controlled by the configuration in
/etc/ld.so.conf.d/i386-linux-gnu_GL.conf. This in turn can be easily switched between libraries provided by different providers using
$ sudo update-alternatives --config i386-linux-gnu_gl_conf
I found that currently the GL library files provided by
/usr/lib/nvidia-352/alt_ld.so.conf, that is, by my NVIDIA drivers was being used. I picked the
/usr/lib/i386-linux-gnu/mesa/ld.so.conf which is by MESA. This only sets the symbolic link for the
/etc/ld.so.conf.d/i386-linux-gnu_GL.conf from the NVIDIA conf file to the MESA conf file.
- Next we update the cache so that the NVIDIA library files are removed and the MESA library files are symbolically linked to as the default GL library files:
$ sudo ldconfig
- Let us check what the cache holds now:
$ ldconfig -p | grep libGL.so.1 libGL.so.1 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 libGL.so.1 (libc6) => /usr/lib/i386-linux-gnu/mesa/libGL.so.1
We can see that we now have an additional entry, which has no architecture specified, but it is for 32-bit by default.
- Finally, let us check if the shared dependencies of the Skype exectuable are met now:
$ ldd /usr/bin/skype | grep libGL libGL.so.1 => /usr/lib/i386-linux-gnu/mesa/libGL.so.1 (0xf16b5000)
Yes, they are! I ran Skype after this and it worked fine! 😄
Tried with: Skype 4.3 (multiarch) and Ubuntu 14.04