OSError: libX11.so: cannot open shared object

Bug #806186 reported by Antonio Galli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EasyShutdown
New
Undecided
Unassigned

Bug Description

My system is an Ubuntu 11.04 64bit

Traceback (most recent call last):
  File "/usr/bin/complexshutdown.py", line 98, in <module>
    xlib = ctypes.cdll.LoadLibrary('libX11.so')
  File "/usr/lib/python2.7/ctypes/__init__.py", line 431, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libX11.so: cannot open shared object file: No such file or directory

I tried

 sudo ln -s /usr/lib32/libX11.so.6 /usr/lib/libX11.so

and I had

Traceback (most recent call last):
  File "/usr/bin/complexshutdown.py", line 98, in <module>
    xlib = ctypes.cdll.LoadLibrary('libX11.so')
  File "/usr/lib/python2.7/ctypes/__init__.py", line 431, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libX11.so: wrong ELF class: ELFCLASS32

Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Opening that library in Python works on this 10.10 64-bit Ubuntu. There
was already a symbolic link in place but it points to somewhere
different to the one created above.

    $ strace -e open python -c '
            import ctypes; print ctypes.cdll.LoadLibrary("libX11.so")
        ' 2>&1 |
    > grep X11
    open("/usr/lib/libX11.so", O_RDONLY) = 3
    <CDLL 'libX11.so', handle 1042fb0 at 7f8d35b4ae50>
    $ ls -l /usr/lib/libX11.so
    lrwxrwxrwx 1 root root 15 2011-10-30 00:43 /usr/lib/libX11.so -> libX11.so.6.3.0
    $ ls -l /usr/lib/libX11.so.6.3.0
    -rw-r--r-- 1 root root 1269216 2010-05-13 17:06 /usr/lib/libX11.so.6.3.0
    $

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.