添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account Steam fails to launch with Ubuntu 16.10 due to "wrong ELF class" error, worked in Ubuntu 16.04.1 LTS #4677 Steam fails to launch with Ubuntu 16.10 due to "wrong ELF class" error, worked in Ubuntu 16.04.1 LTS #4677 Spitfire1900 opened this issue Oct 22, 2016 · 20 comments
  • Steam client version: steam-launcher 1.0.0.53
  • Distribution (e.g. Ubuntu): 16.10
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes
  • I am getting this error, the script below used to fix the libstdc++.so.6 dependency before upgrading to Ubuntu 16.10.

    Script:
    LD_PRELOAD='/usr/lib/x86_64-linux-gnu/libstdc++.so.6' DISPLAY=:0 steam

    uname -a:
    Linux mainstay 4.8.0-26-generic #28-Ubuntu SMP Tue Oct 18 14:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

    Output:

    Running Steam on ubuntu 16.10 64-bit
    STEAM_RUNTIME is enabled automatically
    /bin/bash: /home/kyle/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /bin/bash)
    grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
    grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
    grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
    ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
    Installing breakpad exception handler for appid(steam)/version(1476379980)
    libGL error: unable to load driver: radeonsi_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: radeonsi
    libGL error: unable to load driver: swrast_dri.so
    libGL error: failed to load driver: swrast
          changed the title
    Steam fails to launch with Ubuntu 16.10 do to wrong ELF class error, worked in Ubuntu 16.04.1 LTS
    Steam fails to launch with Ubuntu 16.10 due to "wrong ELF class" error, worked in Ubuntu 16.04.1 LTS
        Oct 22, 2016
              

    I have tried with 32-bit lib as well.

    kyle@mainstay:/etc/pam.d$ LD_PRELOAD='/usr/lib/i386-linux-gnu/libstdc++.so.6' DISPLAY=:0 steam
    ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
    ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
    ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
    Running Steam on ubuntu 16.10 64-bit
    ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
    STEAM_RUNTIME is enabled automatically
    ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
    ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
    ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
    ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
    ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
    ERROR: ld.so: object '/usr/lib/i386-linux-gnu/libstdc++.so.6' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
    grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
    /bin/bash: /home/kyle/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /bin/bash)
    grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
    grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
    Installing breakpad exception handler for appid(steam)/version(1476379980)
    libGL error: unable to load driver: radeonsi_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: radeonsi
    libGL error: unable to load driver: swrast_dri.so
    libGL error: failed to load driver: swrast
              

    Followed https://bugs.archlinux.org/task/48994 and running the command
    find ~/.local/share/Steam/ubuntu12_32/steam-runtime/ -name libgpg-error.so* -delete
    to resolve the error
    libGL: dlopen /usr/lib/xorg/modules/dri/radeonsi_dri.so failed (/usr/lib/libgcrypt.so.20: symbol gpgrt_lock_lock, version GPG_ERROR_1.0

    Now Steam runs.

    Startup script:
    LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 steam

    But now running into issue #4572.

    Interestingly enough I did not get this error with my test install in VirtualBox.

    Wondering if this is due to a previous Steam install. I've upgraded both my desktop and laptop with a clean install of 16.10 and decided to go with a clean install of Steam as well using the official package from Valve. I've only redownloaded one game (Civ V) to my desktop so far, but the download and install went fine and it streams great to my laptop. I haven't had any problems, but I've noticed Civ V seems to load and run quite a bit faster than before.

    Here is my temporary fix.
    rm ~/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6

    Then make a script called steam.sh and always run steam through this script.

    #!/bin/bash
    export LD_PRELOAD='/usr/$LIB/libstdc++.so.6'
    export DISPLAY=:0
    steam

    There should really be a patch that does this automatically in the steam binary.

    @mmstick
    LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /lib/i386-linux-gnu/libgpg-error.so.0'

    resolved issues experienced (Steam runs) though "wrong ELF class: ELFCLASS32" appears repeatedly in console for libgcc_s.so.1 and libgpg-error.so.0.

    Set LD_PRELOAD to '/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /lib/$LIB/libgpg-error.so.0' and Steam will not start.

    NVM, this occurs when attempting to launch Company of Heroes 2.

    CompanyOfHeroes2: crash reporter initialised with path "/home/kyle/.local/share/feral-interactive/CompanyOfHeroes2/crashes"
    libGL error: unable to load driver: radeonsi_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: radeonsi
    libGL error: unable to load driver: swrast_dri.so
    libGL error: failed to load driver: swrast
              

    This gets the Steam client going for me on 15.10:

    $ LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /lib/${PLATFORM}-linux-gnu/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /lib/${PLATFORM}-linux-gnu/libgpg-error.so.0' /usr/bin/steam

    Running Steam on ubuntu 15.10 64-bit
    STEAM_RUNTIME is enabled automatically
    ERROR: ld.so: object '/lib/${PLATFORM}-linux-gnu/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
    ERROR: ld.so: object '/lib/${PLATFORM}-linux-gnu/libgpg-error.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
    ExecCommandLine: "/home/mkitti/.local/share/Steam/ubuntu12_32/steam -foreground"
              

    Still looking into this problem. FYI @mkitti this error appears when I attempt the command you provided on 16.10. I do not know (and haven't been able to find documentation) on what the error LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. actually means.

    LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /lib/${PLATFORM}-linux-gnu/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /lib/${PLATFORM}-linux-gnu/libgpg-error.so.0'; /usr/bin/steam
    Running Steam on ubuntu 16.10 64-bit
    STEAM_RUNTIME is enabled automatically
    /bin/bash: /home/kyle/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /bin/bash)
    grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
    grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
    grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc
    ERROR: ld.so: object '/lib/${PLATFORM}-linux-gnu/libgcc_s.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
    ERROR: ld.so: object '/lib/${PLATFORM}-linux-gnu/libgpg-error.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
    Installing breakpad exception handler for appid(steam)/version(1476379980)
    libGL error: unable to load driver: radeonsi_dri.so
    libGL error: driver pointer missing
    libGL error: failed to load driver: radeonsi
    libGL error: unable to load driver: swrast_dri.so
    libGL error: failed to load driver: swrast
              

    It appears that the system is not having a problem finding the files though. Which re-emphasizes the need to identify the exact nature of the "cannot open shared object file" error.

    $ echo $LD_PRELOAD
    /usr/$LIB/libstdc++.so.6 /lib/${PLATFORM}-linux-gnu/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /lib/${PLATFORM}-linux-gnu/libgpg-error.so.0
    $ export LD_TRACE_LOADED_OBJECTS='true'
    $ steam
            linux-vdso.so.1 =>  (0x00007fff075a5000)
            /usr/$LIB/libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7badff6000)
            /lib/${PLATFORM}-linux-gnu/libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7badddf000)
            /usr/$LIB/libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f7badbbd000)
            /lib/${PLATFORM}-linux-gnu/libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f7bad9a9000)
            libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7bad5e2000)
            libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7bad2d9000)
            /lib64/ld-linux-x86-64.so.2 (0x00007f7bae37e000)
            libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7bad0d5000)
            libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7bacecf000)
    $ ls /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/libgpg-error.so.0
    /lib/x86_64-linux-gnu/libgcc_s.so.1  /lib/x86_64-linux-gnu/libgpg-error.so.0

    Added output of LD_DEBUG='all' when launching steam.
    ld_debug_output.zip

    I have the same issue here. I tried the commands above but with the same error.
    OS: ubuntu 14.04 amd64
    Intel HD graphics driver

    Here's my guess. I use this method to look up missing dependencies of some libs.

    missing dependencies: runtime for 32 bit CPU

    cd ~/.local/share/Steam/ubuntu12_32
    file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq
            libdbus-glib-1.so.2 => not found
            libnm-glib.so.4 => not found
            libnm-util.so.2 => not found
            libopenal.so.1 => not found
            libudev.so.0 => not found
            libusb-1.0.so.0 => not found
            libXtst.so.6 => not found
    

    as you can see there are some missing dependencies.

    Then I checked another folder using the same method

    cd ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu
    file * | grep ELF | cut -d ":" -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found'
    # nothing retured : all right.
    
    cd ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib
    file * | grep ELF | cut -d ":" -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | uniq
            libdbus-glib-1.so.2 => not found
            libdbusmenu-glib.so.4 => not found
            libdbusmenu-gtk.so.4 => not found
            libgudev-1.0.so.0 => not found
            libnspr4.so => not found
            libnss3.so => not found
            libsmime3.so => not found
    

    missing dependencies: runtime for 64 bit CPU

    cd ~/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu
    file * | grep ELF | cut -d: -f1 | LD_LIBRARY_PATH=. xargs ldd | grep 'not found' | sort | uniq
            libudev.so.0 => not found
    

    Method from : https://wiki.archlinux.org/index.php/Steam/Troubleshooting#Steam_runtime_issues

    Alternatively, while Steam is running, the following command will show which non-system libraries Steam is using (not all of these are part of the Steam runtime):
    $ for i in $(pgrep steam); do sed '/\.local/!d;s/.* //g' /proc/$i/maps; done | sort | uniq

    I think this is a general steam lib pain on Linux... I suggest Steam use static libs more often than using dynamic libs before driving users crazy...

    I just innstall Steam on Ubuntu 17.04 Zesty, same bug: Steam did not launch without any error message. I erased libgpg.so.0 files from /home/your_profile_name/.steam like described on this forum:
    https://forum.manjaro.org/t/cannot-start-steam/1677
    and Steam finally launched.

    My similar problem was solved by the following thread:

    http://steamcommunity.com/app/266510/discussions/0/2333276539593630905/

    Specifically, STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0 steam.

    Specifically, STEAM_RUNTIME_PREFER_HOST_LIBRARIES=0 steam.

    This fixed it for me after upgrading to Fedora 26. Thank you.

    You can also change /usr/share/applications/steam.desktop to use a executable of your own to fix it.