OSError: libX11.so: cannot open shared object
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/
xlib = ctypes.
File "/usr/lib/
return self._dlltype(name)
File "/usr/lib/
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/
and I had
Traceback (most recent call last):
File "/usr/bin/
xlib = ctypes.
File "/usr/lib/
return self._dlltype(name)
File "/usr/lib/
self._handle = _dlopen(self._name, mode)
OSError: libX11.so: wrong ELF class: ELFCLASS32
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 ' cdll.LoadLibrar y("libX11. so") "/usr/lib/ libX11. so", O_RDONLY) = 3 libX11. so.6.3. 0 libX11. so.6.3. 0
import ctypes; print ctypes.
' 2>&1 |
> grep X11
open(
<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/
-rw-r--r-- 1 root root 1269216 2010-05-13 17:06 /usr/lib/
$