Skype error on libGL shared library

Problem

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

Solution

  • 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.1 was 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 update-alternatives:
$ 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

Advertisements

Camera Error on Moto G

Problem

You open the Camera app on Moto G to take a photo. The app throws a Camera Error message and closes. If the Moto G is restarted, then the Camera app works fine. But after some hours, this error might happen again.

Solution

According to the discussion on this forum thread, the culprit is the Skype app. It seems to be not releasing the camera resource in a clean manner.

I used to face this error on a daily basis. Skype seems to be have fixed their error. After their recent update, I have not faced this error in more than 2 weeks. For reference, the current Skype version on my Moto G is 4.7.0.43514.

Tried with: Android 4.4.2 and Moto G

How to use Skype on Linux

Skype is not just used for audio or video chat, but for plain old text chatting too. I use Skype with a Outlook.com account on Ubuntu. I wish I could just chat from inside Outlook.com, like you can use GChat from inside Gmail web interface. There are Skype for Outlook.com extensions available for the major browsers, but they seem to install only on Windows. I could not install them on Linux. I wish this worked because it would be convenient to chat with Skype contacts directly from my Outlook.com webpage messaging sidebar.

Instead, I use the Skype client which is available for various Linux distributions. Just download that for your distribution here and install it. For Ubuntu, this downloads a multiarch .deb file. The recent versions of Skype client allow you to use your Outlook.com account. Just choose the Microsoft account option during login.

Tried with: Skype 4.2 for Linux and Ubuntu 12.04