我对一天前的拱门系统有疑问。我不小心搬出/usr/lib/libX11.so.6
来/usr/lib
然后又放回去了。但现在,我无法启动 Android Studio,因为:
/usr/lib/jvm/java-8-jdk/bin/java: symbol lookup error: /usr/lib/libX11.so.6: undefined symbol: xcb_wait_for_reply64
我努力了:
- 重新安装/重新编译 libxcb 和 libX11
- 在 Oracle 的 JDK 和 OpenJDK 之间切换
- 重新安装AS
什么都没起作用。权限和所有权对我来说也很好:
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
我在跑
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
有关如何解决这个问题的任何指示吗?非常感谢!
* 编辑 *
该问题并非特定于 java,因为 genymotion 也无法启动:
me@laptop ~ % genymotion
genymotion: symbol lookup error: /usr/lib/libX11.so.6: undefined symbol: xcb_wait_for_reply64
*第二次编辑*
遵循@n.st的建议:
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)
答案1
我遇到了这个问题genymotion
。
只需导航到 genymotion 目录 ( cd /opt/genymotion
) 并执行即可。
sudo mv libxcb.so.1 libxcb.so.1.back
如果这不能解决您的问题
sudo mv libxcb.so.1.back libxcb.so.1
答案2
看来/opt/genymotion
您的版本中$LD_LIBRARY_PATH
提供的版本与您系统上安装的库不兼容。
您应该尝试其他程序,例如 java 或 xterm 等不带LD_LIBRARY_PATH
.您可以使用 尝试一下unset LD_LIBRARY_PATH
,下次登录后就会恢复。如果这有帮助,您可以找出它的设置位置并将其永久删除。
该程序genymotion
可能存在相反的问题,缺少libX11.so.6
in 。/opt/genymotion
也有可能通过恢复/opt/genymotion/libX11.so.6
您的其他程序将再次运行,因为各种 X 库的匹配非常重要。