11

After Nvidia driver installation when I try to run Steam I am getting this error:

steam: error while loading shared libraries: libGL.so.1: wrong ELF class: ELFCLASS64

I found this question and one of the answers that suggest installing:

sudo apt-get install libgl1-mesa-glx:i386

I have already installed libgl1-mesa-glx:i386. Than I found this. It suggests making a symlink to 32bit libGL. How can do that? Do you have any other suggestions?

2
  • I can confirm, that reinstalling the libgl1 library did help. Ubuntu 14.04 x86-64, desktop compiz, graphical driver Nvidia for GEForce GTS 450.
    – hariprasad
    Jul 10 '14 at 8:46
  • A sudo aptitude install libgl1-mesa-glx:i386 shows 305 packages will be removed, and about 100 will be unresolved. As this looks like it will stuff up my system I suspect the best course of action is to dual boot Ubuntu with 64 libraries and 32bit library, or better, one primary system for most things, one 64bit install for games, and a 32bit instance on its own partition for 32 bit games.
    – Underverse
    Feb 11 '17 at 7:34
11

This problem on 64-bits systems is caused by /usr/lib being earlier in the LD_LIBRARY_PATH than /usr/lib32. Steam tries the 64-bit libraries and complains, without looking any further.

It can be fixed however by in ~/Steam/steam.sh but that file seems to be restored to the original version every time steam is ran.

I fixed it by creating a script that does this:

#!/bin/bash
export LD_LIBRARY_PATH=/usr/lib32:$LD_LIBRARY_PATH
steam $*

This prepends /usr/lib32 to the library path, then starts steam (with the script's original arguments). Now /usr/lib32 is found in the path before /usr/lib, and steam will successfully use the 32-bit libraries.

You may also want to add the line

export LD_LIBRARY_PATH=/usr/lib32:$LD_LIBRARY_PATH

to /usr/bin/steam, it will have the same effect, as long as you add it before the very last line. You'll need to sudo to edit /usr/lib/steam.

  • This has the added bonus that it's a better fix, since everything that starts steam (the application menu entry, file type associations, URI associations) will work correctly.
  • The disadvantage is that /usr/bin/steam is likely to be overwritten when steam is updated.

I use the latter method, while keeping the script as a backup. That way, if /usr/bin/steam gets overwritten, I can simply copy paste the line again from the script to fix it.

7

Fixed this in raring ringtail (xubuntu 13.04) with nVidia 319.17 drivers by adding /usr/lib32 to a new file:

$ sudo nano /etc/ld.so.conf.d/lib32.conf

then running:

$ sudo ldconfig 

Since the file /etc/ld.so.conf contains include /etc/ld.so.conf.d/*.conf, any file in that directory with the extension .conf gets parsed.

1
  • This is probably better than any of the other answers.
    – Tek
    May 20 '13 at 13:59
4

From: https://github.com/ValveSoftware/steam-for-linux/issues/321

I got the same issue and solved it by doing this:

$ cd ~/.steam/bin
$ ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 .

This worked for me as well.

0
2

Fixed this for Mint 14 with the newest 64 bit Nvidia drivers 310.32 with the 32bit driver support installed in

/emul/ia32-linux/usr/lib 

by adding

export LD_LIBRARY_PATH=/emul/ia32-linux/usr/lib:$LD_LIBRARY_PATH 

After the first "export" in the beginning of the /usr/bin/steam file.

1
  • Using "Mint" as a basis is not suggested, since Mint is offtopic here, even if it is a derivative of Ubuntu
    – Thomas Ward
    Apr 23 '13 at 23:54
2

I ran into the same problem, but with skype. All the solutions above (creating symlinks, configuring LD_LIBRARY_PATH) didn't work for me.

I finally found help in the post already mentioned above - but with a different solution.

It seems that the nvidia updater (when asking for permission to install OpenGL 32-bit compatibility libraries) messed up and removed /usr/lib/i386-linux-gnu/mesa/libGL.so.1 and /usr/lib/i386-linux-gnu/mesa/libGL.so.

Reinstalling the libgl1 library did help:

sudo apt-get install --reinstall libgl1-mesa-glx:i386

1

If you're using Steam for Linux limited beta, I would post that on the Steam for Linux forums. They should have better help, and if it's a problem with the software itself, the developers will be able to fix it. Also, if you're using a 64-bit OS, there are plenty of people there that have probably gone through the troubles you have, and, therefore, know exactly what to do.

0

I had exactly same issue on Linux Mint Debian Edition 2 64-bit.

I resolved it by re-installing NVIDIA drivers with the 32-bit GL libraries (after installing those libraries steam requested).

I just assume that installing those other 32-bit graphics libraries broke some linking, and reinstalling NVIDIA drivers with those real 32-bit libraries fixes the linking problem.

0

I had this problem with Skype. I fixed it by installing official Nvidia driver again and install 32 bit compatibility library during installation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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