Lubuntu 启动进入终端。Xorg 无法连接到 Zlib

Lubuntu 启动进入终端。Xorg 无法连接到 Zlib

我的 Lubuntu 18.04 直接启动到终端。当我尝试启动 GUI 时,startx我收到以下错误消息:

xauth: timeout in locking authority file /home/jonathan/.Xauthority
xauth: timeout in locking authority file /home/jonathan/.Xauthority

/usr/lib/xorg/Xorg: /usr/local/lib/libz.so.1: version 'ZLIB_1.2.9' not found (required by usr/lib/x86_64-linux-gnu/libpng16.so.16)
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
xauth: timeout in locking authority file /home/jonathan/.Xauthority

我已经安装了 zlib1.2.11。

我尝试过以下解决方案:https://ubuntuforums.org/showthread.php?t=2375927但它对我不起作用。

ls -l /usr/local/lib 返回

in total 35772 
-rw-r--r-- 1 root root 21122658 Aug 31 15:39 libgsl.a
-rw-r--r-- 1 root root 18922458 Aug 31 15:39 libgslcblas.a
-rwxr-xr-x 1 root root      949 Aug 31 15:39 libgslcblas.la
lrwxrwxrwx 1 root root       20 Aug 31 15:39 libgslcblas.so -> libgslcblas.so.0.0.0
lrwxrwxrwx 1 root root       20 Aug 31 15:39 libgslcblas.so.0 -> libgslcblas.so.0.0.0
-rwxr-xr-x 1 root root  1098600 Aug 31 15:39 libgslcblas.so.0.0.0
-rwxr-xr-x 1 root root      918 Aug 31 15:39 libgsl.la
lrwxrwxrwx 1 root root       16 Aug 31 15:39 libgsl.so -> libgsl.so.23.1.0
lrwxrwxrwx 1 root root       16 Aug 31 15:39 libgsl.so.23 -> libgsl.so.23.1.0
-rwxr-xr-x 1 root root 12200128 Aug 31 13:39 libgsl.so.23.1.0
-rwxr-xr-x 1 root root   159134 Feb  8 15:29 libz.a
lrwxrwxrwx 1 root root       13 Feb  8 18:59 libz.so -> libz.so.1.2.8
lrwxrwxrwx 1 root root       13 Feb  8 18:59 libz.so.1 -> libz.so.1.2.8
-rwxr-xr-x 1 root root   121384 Feb  8 15:29 libz.so.1.2.8
drwxr-xr-x 2 root root     4096 Feb  8 15:29 pkgconfig
drwxrwsr-x 4 root staff    4096 Nov 14 08:25 python2.7
drwxrwsr-x 3 root staff    4096 Apr 26  2018 python3.6
drwxrwsr-x 3 root staff    4096 Aug 17 12:49 R

ls -lL /usr/local/lib 返回

in total 61996
-rw-r--r-- 1 root root 21122658 Aug 31 15:39 libgsl.a
-rw-r--r-- 1 root root 18922458 Aug 31 15:39 libgslcblas.a
-rwxr-xr-x 1 root root      949 Aug 31 15:39 libgslcblas.la
-rwxr-xr-x 1 root root  1098600 Aug 31 15:39 libgslcblas.so -> libgslcblas.so.0.0.0
-rwxr-xr-x 1 root root  1098600 Aug 31 15:39 libgslcblas.so.0 -> libgslcblas.so.0.0.0
-rwxr-xr-x 1 root root  1098600 Aug 31 15:39 libgslcblas.so.0.0.0
-rwxr-xr-x 1 root root      918 Aug 31 15:39 libgsl.la
-rwxr-xr-x 1 root root 12200128 Aug 31 15:39 libgsl.so -> libgsl.so.23.1.0
-rwxr-xr-x 1 root root 12200128 Aug 31 15:39 libgsl.so.23 -> libgsl.so.23.1.0
-rwxr-xr-x 1 root root 12200128 Aug 31 13:39 libgsl.so.23.1.0
-rw-r--r-- 1 root root   159134 Feb  8 15:29 libz.a
-rwxr-xr-x 1 root root   121384 Feb  8 18:59 libz.so -> libz.so.1.2.8
-rwxr-xr-x 1 root root   121384 Feb  8 18:59 libz.so.1 -> libz.so.1.2.8
-rwxr-xr-x 1 root root   121384 Feb  8 15:29 libz.so.1.2.8
drwxr-xr-x 2 root root     4096 Feb  8 15:29 pkgconfig
drwxrwsr-x 4 root staff    4096 Nov 14 08:25 python2.7
drwxrwsr-x 3 root staff    4096 Apr 26  2018 python3.6
drwxrwsr-x 3 root staff    4096 Aug 17 12:49 R

非常感谢您的建议。

答案1

考虑删除错误安装的本地版本libz并从存储库中重新安装正常版本:

sudo rm /usr/local/lib/libz.so.1
sudo apt install --reinstall zlib1g

/usr/local/lib注意:下次不要安装系统范围的库!

相关内容