2

I have a problem with a one-day-old arch system. I accidentally moved /usr/lib/libX11.so.6 out of /usr/lib and then put it back. But now, I cannot launch Android Studio because of this:

/usr/lib/jvm/java-8-jdk/bin/java: symbol lookup error: /usr/lib/libX11.so.6: undefined symbol: xcb_wait_for_reply64

I have tried:

  • Reinstalling/recompiling libxcb and libX11
  • Switching between Oracle's JDK and OpenJDK
  • Reinstalled AS

Nothing works. Permissions and ownership look good to me as well:

me@laptop ~ % ls -ld /usr/lib/libX11*
lrwxrwxrwx 1 root root      19 Oct  5 00:24 /usr/lib/libX11-xcb.so -> libX11-xcb.so.1.0.0
lrwxrwxrwx 1 root root      19 Oct  5 00:24 /usr/lib/libX11-xcb.so.1 -> libX11-xcb.so.1.0.0
-rwxr-xr-x 1 root root    5968 Oct  5 00:24 /usr/lib/libX11-xcb.so.1.0.0
lrwxrwxrwx 1 root root      15 Oct  5 00:24 /usr/lib/libX11.so -> libX11.so.6.3.0
lrwxrwxrwx 1 root root      15 Oct  5 00:24 /usr/lib/libX11.so.6 -> libX11.so.6.3.0
-rwxr-xr-x 1 root root 1306096 Oct  5 00:24 /usr/lib/libX11.so.6.3.0 

me@laptop ~ % ls -ld /usr/lib/libx*
lrwxrwxrwx 1 root root       14 Oct  2 09:27 /usr/lib/libx264.so -> libx264.so.148
-rwxr-xr-x 1 root root  1027856 Oct  2 09:27 /usr/lib/libx264.so.148
lrwxrwxrwx 1 root root       13 Sep 29 09:09 /usr/lib/libx265.so -> libx265.so.95
-rwxr-xr-x 1 root root 14953136 Sep 29 09:09 /usr/lib/libx265.so.95
lrwxrwxrwx 1 root root       21 Oct  7 04:01 /usr/lib/libxatracker.so -> libxatracker.so.2.3.0
lrwxrwxrwx 1 root root       21 Oct  7 04:01 /usr/lib/libxatracker.so.2 -> libxatracker.so.2.3.0
-rwxr-xr-x 1 root root  3305176 Oct  7 04:01 /usr/lib/libxatracker.so.2.3.0
lrwxrwxrwx 1 root root       25 May 22 13:44 /usr/lib/libxcb-composite.so -> libxcb-composite.so.0.0.0
lrwxrwxrwx 1 root root       25 May 22 13:44 /usr/lib/libxcb-composite.so.0 -> libxcb-composite.so.0.0.0
-rwxr-xr-x 1 root root    10336 May 22 13:44 /usr/lib/libxcb-composite.so.0.0.0
lrwxrwxrwx 1 root root       22 May 22 13:44 /usr/lib/libxcb-damage.so -> libxcb-damage.so.0.0.0
lrwxrwxrwx 1 root root       22 May 22 13:44 /usr/lib/libxcb-damage.so.0 -> libxcb-damage.so.0.0.0
-rwxr-xr-x 1 root root    10336 May 22 13:44 /usr/lib/libxcb-damage.so.0.0.0

I'm running

me@laptop ~ % uname -a
Linux laptop 4.7.6-1-ARCH #1 SMP PREEMPT Fri Sep 30 19:28:42 CEST 2016 x86_64 GNU/Linux

Any pointers on how to solve this? Thanks so much!

* EDIT *

The problem is not specific to java, since genymotion cannot be launched either:

me@laptop ~ % genymotion
genymotion: symbol lookup error: /usr/lib/libX11.so.6: undefined symbol: xcb_wait_for_reply64

* 2nd EDIT *

Followed @n.st advice:

me@laptop ~ % ldd $(which genymotion) | grep libX11                                                                 
    libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fc3520d5000)
    libX11-xcb.so.1 => /opt/genymotion/libX11-xcb.so.1 (0x00007fc34e201000)
me@laptop ~ % sudo mv /opt/genymotion/libX11-xcb.so.1 .                                                             
[sudo] password for me: 
me@laptop ~ % genymotion
genymotion: symbol lookup error: /usr/lib/libX11.so.6: undefined symbol: xcb_wait_for_reply64
127 me@laptop ~ % ldd $(which genymotion) | grep libX11                                                               
    libX11.so.6 => /usr/lib/libX11.so.6 (0x00007feb0712d000)
    libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007feb03259000)
me@laptop ~ % ldd $(which genymotion) | grep libxcb
    libxcb-dri3.so.0 => /opt/genymotion/libxcb-dri3.so.0 (0x00007f5f354e1000)
    libxcb-present.so.0 => /opt/genymotion/libxcb-present.so.0 (0x00007f5f352de000)
    libxcb-sync.so.1 => /opt/genymotion/libxcb-sync.so.1 (0x00007f5f350d8000)
    libxcb.so.1 => /opt/genymotion/libxcb.so.1 (0x00007f5f34270000)
    libxcb-glx.so.0 => /opt/genymotion/libxcb-glx.so.0 (0x00007f5f34059000)
    libxcb-dri2.so.0 => /opt/genymotion/libxcb-dri2.so.0 (0x00007f5f33e54000)
  • Check if genymotion is using the correct library paths (there might be a library file in ., /usr/local/lib, …, that's shadowing the one in /usr/lib): ldd $(which genymotion) – n.st Oct 16 '16 at 19:43
  • What about libxcb*? – n.st Oct 16 '16 at 19:54
  • I'm mostly working with some Google-fu here, namely this and this. ;) – n.st Oct 16 '16 at 19:55
  • Yes, I did see those yesterday, that's why I moved libX11-xcb.so.1 out of /opt/genymotion, but the problem still shows launching Android Studio :( – Chisko Oct 16 '16 at 19:57
  • What command are you using to launch Android Studio? – n.st Oct 16 '16 at 19:58
2

I had this problem with genymotion.
Just navigate to genymotion directory ( cd /opt/genymotion ) and do.

sudo mv libxcb.so.1 libxcb.so.1.back 

If this did'nt solve your problem do

sudo mv libxcb.so.1.back libxcb.so.1
  • 1
    already tried that. Did not work. – Chisko Oct 19 '16 at 14:54
0

It seems that /opt/genymotion is in your $LD_LIBRARY_PATH and that the versions provided there are not compatible with the libraries installed on your system.

Rather than moving all the files from that directory, you should try other programs like java or xterm without the LD_LIBRARY_PATH. You can try it with unset LD_LIBRARY_PATH, it will be back after your next login. If that helps, you can find out where it is set and remove it permanently.

The program genymotion probably has the reverse problem, the libX11.so.6 in /opt/genymotion is missing. It's also possible that by restoring /opt/genymotion/libX11.so.6 your other programs will work again, as it's mainly important that the various X libraries match.

  • this might be useful, unfortunately I cannot verify it because I ended up formatting. Thanks. – Chisko Sep 26 '18 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.