OSError: /usr/lib/libc.so: invalid ELF header

Issue #1 resolved
Former user created an issue

On ArchLinux, i can't import sdl2.ext because /usr/lib/libc.so is an ASCII text file.

Traceback (most recent call last): File "./main.py", line 6, in <module> import sdl2.ext as sdl2ext File "/usr/lib/python2.7/site-packages/sdl2/init.py", line 14, in <module> from .audio import * File "/usr/lib/python2.7/site-packages/sdl2/audio.py", line 6, in <module> from .stdinc import Uint8, Uint16, Uint32 File "/usr/lib/python2.7/site-packages/sdl2/stdinc.py", line 30, in <module> _libc = cdll.LoadLibrary("libc.so") File "/usr/lib/python2.7/ctypes/init.py", line 443, in LoadLibrary return self._dlltype(name) File "/usr/lib/python2.7/ctypes/init.py", line 365, in init self._handle = _dlopen(self._name, mode) OSError: /usr/lib/libc.so: invalid ELF header

$ file /usr/lib/libc.so /usr/lib/libc.so: ASCII text

$ file /usr/lib/libc.so.6 /usr/lib/libc.so.6: symbolic link to `libc-2.17.so'

$ cat /usr/lib/libc.so / GNU ld script Use the shared library, but some functions are only in the static library, so try that secondarily. / OUTPUT_FORMAT(elf64-x86-64) GROUP ( /usr/lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /usr/lib/ld-linux-x86-64.so.2 ) )

Comments (1)

  1. Marcus von Appen repo owner

    Fixed in revision 8635327. For a local fix, please change

    _libc = cdll.LoadLibrary("libc.so")


    _libc = cdll.LoadLibrary(find_library("c"))

    within stdinc.py

  2. Log in to comment