Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  12] [ 0]  / answers: 1 / hits: 65476  / 2 Years ago, sun, september 11, 2022, 12:03:26

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?


More From » nvidia

 Answers
4

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.


[#34331] Tuesday, September 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mugustered

Total Points: 193
Total Questions: 123
Total Answers: 108

Location: Bermuda
Member since Wed, Mar 22, 2023
1 Year ago
mugustered questions
Sat, Nov 19, 22, 07:03, 1 Year ago
Sun, May 29, 22, 11:53, 2 Years ago
Fri, Dec 23, 22, 15:02, 1 Year ago
;