Evince 无法运行(提示缺少共享库)

Evince 无法运行(提示缺少共享库)

我已经看过了另一个答案但这并没有解决我的问题。我使用的是 Xubuntu 16.04,今天当我启动 evince 时,出现了这个错误:

evince: error while loading shared libraries: libevdocument3.so.4: cannot open shared object file: No such file or directory

但是 ldd 清楚地表明该文件存在:

ldd /usr/bin/evince|grep evdoc
libevdocument3.so.4 => /usr/lib/x86_64-linux-gnu/libevdocument3.so.4 (0x00007fcb32610000)

调试输出如下:

export LD_DEBUG=all
evince
     16254: 
     16254: WARNING: Unsupported flag value(s) of 0x8000000 in DT_FLAGS_1.
     16254: 
     16254: file=libevdocument3.so.4 [0];  needed by evince [0]
     16254: find library=libevdocument3.so.4 [0]; searching
     16254:  search cache=/etc/ld.so.cache
     16254:  search path=/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu:/lib/tls/x86_64:/lib/tls:/lib/x86_64:/lib:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/x86_64:/usr/lib        (system search path)
     16254:   trying file=/lib/x86_64-linux-gnu/tls/x86_64/libevdocument3.so.4
     16254:   trying file=/lib/x86_64-linux-gnu/tls/libevdocument3.so.4
     16254:   trying file=/lib/x86_64-linux-gnu/x86_64/libevdocument3.so.4
     16254:   trying file=/lib/x86_64-linux-gnu/libevdocument3.so.4
     16254:   trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/libevdocument3.so.4
     16254:   trying file=/usr/lib/x86_64-linux-gnu/tls/libevdocument3.so.4
     16254:   trying file=/usr/lib/x86_64-linux-gnu/x86_64/libevdocument3.so.4
     16254:   trying file=/usr/lib/x86_64-linux-gnu/libevdocument3.so.4
     16254:   trying file=/lib/tls/x86_64/libevdocument3.so.4
     16254:   trying file=/lib/tls/libevdocument3.so.4
     16254:   trying file=/lib/x86_64/libevdocument3.so.4
     16254:   trying file=/lib/libevdocument3.so.4
     16254:   trying file=/usr/lib/tls/x86_64/libevdocument3.so.4
     16254:   trying file=/usr/lib/tls/libevdocument3.so.4
     16254:   trying file=/usr/lib/x86_64/libevdocument3.so.4
     16254:   trying file=/usr/lib/libevdocument3.so.4
     16254: 
evince: error while loading shared libraries: libevdocument3.so.4: cannot open shared object file: No such file or directory

奇怪的是,昨天 Evince 运行正常,今天却突然出现这种情况!这段时间我从未安装/卸载过任何软件包。我唯一做的事情就是运行一些应用程序,如 netbeans 和 android-studio(从我的主目录)。可能是什么问题?

编辑

prahlad@parrot:/data$ ls -ld / /usr /usr/lib /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/libevdocument3.so.4
drwxr-xr-x  25 root root  4096 Jun 13 13:26 /
drwxr-xr-x  10 root root  4096 Oct 21  2015 /usr
drwxr-xr-x 139 root root 20480 Jul  6 22:50 /usr/lib
drwxr-xr-x 102 root root 90112 Jul 11 13:50 /usr/lib/x86_64-linux-gnu/
lrwxrwxrwx   1 root root    23 Mar  9 03:23 /usr/lib/x86_64-linux-gnu/libevdocument3.so.4 -> libevdocument3.so.4.0.0

prahlad@parrot:/data$ file /usr/lib/x86_64-linux-gnu/libevdocument3.so.4
/usr/lib/x86_64-linux-gnu/libevdocument3.so.4: symbolic link to libevdocument3.so.4.0.0

prahlad@parrot:/data$ uname -a
Linux parrot 4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
/data$ 

答案1

您的共享库位于其应在的位置,但可能未得到正确识别和缓存。

该命令ldconfig扫描配置为包含此类动态共享库的所有目录,并使用找到的内容更新库缓存和链接。

只需像这样运行它:

sudo ldconfig

它应该在一秒或更短的时间内完成,并将修复与缺少共享库链接和过时的库缓存相关的问题。

相关内容