Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

When attempting to run various pieces of software (notably Steam and Yenka), I have come across an error similar to this: error while loading shared libraries: cannot open shared object file: No such file or directory

I'm running a 64 bit system, with an NVidia Optimus card (I dual boot for certain windows only software that requires a dedicated graphics card). I have bumblebee installed, and I am using the nvidia-current driver, rather that one downloaded from NVidia, as recommended.

The library ( is not present in the top directory of /usr/lib, however it is present in /usr/lib32/nvidia-current, as a softlink to /usr/lib32/nvidia-current/

A section of the output from ldconfig -p: (libc6,x86-64, OS ABI: Linux 2.4.20) => /usr/lib/x86_64-linux-gnu/mesa/ (libc6,x86-64, OS ABI: Linux 2.4.20) => /usr/lib/x86_64-linux-gnu/ (libc6,x86-64, OS ABI: Linux 2.4.20) => /usr/lib/x86_64-linux-gnu/mesa/

Obviously a library with that name is being loaded, but they are located in /usr/lib/x86_64-linux-gnu, however installed software doesn't seem to able to 'see' it. For Steam, running it with optirun causes it to work, but this is not the case for Yenka. I assume that optirun causes the library stored in /usr/lib32/nvidia-current to be used, which allows Steam to run, so I can't understant why Yenka won't run.

Can anyone explain why software can't see the normal mesa library, and why Yenka refuses to run with the nvidia-current library?

share|improve this question

8 Answers 8

up vote 31 down vote accepted

With the nvidia drivers installed skype is looking for an i386 lib provided by the nvidia package. Since that doesn't exist, it is ok to use the i386 provided by mesa.

Tested on (ubuntu-gnome raring, using nvidia-325) and (ubuntu-gnome saucy, using nvidia-319) we were able to fix this by the following:

update-alternatives --display i386-linux-gnu_gl_conf

This will show you what the available options are.

i386-linux-gnu_gl_conf - auto mode
  link currently points to /usr/lib/nvidia-325/
/usr/lib/i386-linux-gnu/mesa/ - priority 500
  slave i386-linux-gnu_xorg_extra_modules: /usr/lib/i386-linux-gnu/xorg/x11-extra-modules
/usr/lib/nvidia-325/ - priority 8602
Current 'best' version is '/usr/lib/nvidia-325/'

so, do the following:

sudo update-alternatives --config i386-linux-gnu_gl_conf

then select the best alternative (I selected i386-linux-gnu/mesa/ In the output below there are two choices for the alternative i386-linux-gnu_gl_conf (providing /etc/

  Selection    Path                                     Priority   Status
* 0            /usr/lib/nvidia-325/        8602      auto mode
  1            /usr/lib/i386-linux-gnu/mesa/   500       manual mode
  2            /usr/lib/nvidia-325/        8602      manual mode

Press enter to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/lib/i386-linux-gnu/mesa/ to provide /etc/ (i386-linux-gnu_gl_conf) in manual mode

After you have completed that, try running:

sudo ldconfig

and then you're done.

share|improve this answer
I had the exact same and this worked perfectly, thanks very much (Ubuntu 13.10) – Xtremesupremacy3 Oct 4 '13 at 19:33
annoying - I only have the option, so get "There is only one alternative in link group i386-linux-gnu_gl_conf (providing /etc/ /usr/lib/i386-linux-gnu/mesa/ Nothing to configure." – dez93_2000 Oct 15 '14 at 13:01
which nvidia packages do you have installed? Do you have libgl1-mesa-glx installed? On trusty libgl1-mesa-glx:i386 provides /usr/lib/i386-linux-gnu/mesa/ (and the assocaited* libraries. – eurythmia Oct 20 '14 at 17:45
Great answer. I was getting errors running a Qt program after switching to the Nvidia driver -- QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked and [xcb] This is most likely caused by a broken X extension library -- and following this cleared it up. – Matthew Read Apr 10 at 16:45
Thanks. It works on 14.04 too. This isn't going to affect any other program. Will it? Like fixing one thing breaks 10 other. – Sudhir Khanger May 7 at 8:52

I am having the same issue after installing skype you can do either thing to fix this error..

1st one is run the application by following command ...for example i m running skype..

LD_PRELOAD=/usr/lib/i386-linux-gnu/mesa/ skype


2nd that what i did

sudo nano /etc/

and add the following line in it


save & exit

and lastly run

sudo ldconfig -v

i hope this will fix your error as it did mine

You can also find

   find / -name
share|improve this answer
I managed to fix it in the end. Unfortunately, I can't remember how, but I remember it consisted of creating random symlinks to the library, running ldconfig a lot, and then removing the aforementioned symlinks. Everything works fine now. – jdp407 Mar 21 '13 at 20:56
This worked fine! Finally! Also, I remember doing what @jdp407 said before these steps. – Gundars Mēness Aug 18 '13 at 9:53
While this solution is good, it only ever handles applications one at a time. If you have any other 32 bit applications that require a, then you will have to repeat the process for those applications. It's best to set this preference globally using update-alternatives – eurythmia Apr 29 '14 at 12:04
@eurythmia You can also copy it in /lib and run sudo ldconfig and it will be global access – Qasim Apr 29 '14 at 12:07
sadly doesn't work for me on xubuntu, "ERROR: object '/usr/lib/i386-linux-gnu/mesa/' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored"; skype.conf is in etc/dbus-1/system.d not / and looks to be a different file... – dez93_2000 Oct 15 '14 at 13:04

I'm not sure if this'll help clarify or not but I had the same issue with skype and Also running 13.04 with an optimus card and bumblebee.

I got the issue running skype without optirun, but it worked fine with. I just changed the desktop file to run with optirun every time and voila. fixed!

share|improve this answer
Not really fixed, since you're now using the more energy-greedy card for skype. Indeed, if you're using the VirtualGL bridge rather than primus, you're essentially going to burn as much power as if you didn't have bumblebee installed and just used the nvidia card all the time. – Jon Hanna May 6 '14 at 9:51

I had a similar problem and solved it by installing 32bit libs on my 64bit system: apt-get install ia32-libs

share|improve this answer

The fixes here will work, but there's a simpler one.

If skype doesn't work but optirun skype does work, then you can fix it with:

sudo apt-get install bumblebee-nvidia --reinstall

(People using Bumblebee with AMD cards may need to do the equivalent re-installation).

Bumblebee both causes and fixes this problem, but the fix it applies happens upon installation, when it makes the libGL libraries available to the integrated card as well as the more powerful card. This won't happen if those libraries weren't already installed when you installed Bumblebee, hence needing a re-installation. It shouldn't affect your bumblebee configuration either, though it's obviously worth checking after you've done this.

share|improve this answer
it works well for me...thanks. Ubuntu gnome 14.04 – aditia May 5 '14 at 6:21
Definitely the easiest solution! I knew it had something to do with the installation order as I reinstalled my system twice recently (Ubuntu 14.04 64bit + Nvidia Optimus graphics card). The first time I first installed Skype and then Bumblebee, in which case I had no problems. The second time I first installed Bumblebee and then Skype and this problem arose. Simply reinstalling bumblebee-nvidia as shown in this answer solved the problem! – Sicco Aug 27 '14 at 21:38
I am inclined to agree that this seems like a better solution than mine. – eurythmia Aug 16 at 23:11

Download the latest version from the official steam page, than let it download what it needs from the terminal(if any needs). than add bumblebee ppa if you did not already.

sudo add-apt-repository ppa:bumblebee/stable

update it with this command:

sudo apt-get update

and install virtualgl(that solved the error stuff for me in Steam)

sudo apt-get install virtualgl
share|improve this answer

Edit the desktop entry:

sudo nano /usr/share/applications/skype.desktop

Change the Exec to:

Exec=env PULSE_LATENCY_MSEC=60 LD_PRELOAD=/usr/lib/i386-linux-gnu/mesa/ skype %U

This runs:


before running skype when you start it with the launcher / desktop entry.

It should run fine after that as long as you start it using the application launcher.

share|improve this answer
The file may not be in that path (it wasn't for me, on Debian 8/Jessie). To find the path which you must put in LD_PRELOAD simply find the i386 file on your system: sudo find / -name 2>/dev/null. I found it in /usr/lib/mesa-diverted/i386-linux-gnu/ and it worked fine using that as LD_PRELOAD. – f.ardelian Feb 15 at 4:39


sudo apt-get install libgl1-mesa-glx-lts-utopic:i386
share|improve this answer

protected by Community Oct 11 '14 at 14:15

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.