2

I've already looked this other answer but that didn't resolve my issue. I'm on Xubuntu 16.04 and today when I started evince, I got this error:

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

But ldd clearly says that the file is present:

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

The debug output is as follows:

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

The strange thing is that yesterday Evince was working fine and today this suddenly happened! I've never installed/uninstalled any packages during this time. Only thing I've done is run a few apps like netbeans and android-studio (from my home directory). What could be the issue?

edit

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$ 
8
  • Look at ls -ld / /usr /usr/lib /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/libevdocument3.so.4; file /usr/lib/x86_64-linux-gnu/libevdocument3.so.4;uname -a
    – waltinator
    Jul 18, 2016 at 21:12
  • @waltinator Updated post with the output of all the commands. Jul 18, 2016 at 21:40
  • Wait, I'm thinking that the symlink that libevdocument3.so.4 points to (i.e. libevdocument3.so.4.0.0) is not executable (x), so could that be the case for failure? Is it the case that both the main file and its symlink BOTH should be executable? Jul 18, 2016 at 21:42
  • Does the link target, libevdocument3.so.4.0.0, exist? Is it world readable? Forget executable, that's not needed.
    – ubfan1
    Jul 18, 2016 at 21:54
  • Does running sudo ldconfig change anything? That rescans the dynamic library directories and updates their cache.
    – Byte Commander
    Jul 18, 2016 at 22:48

1 Answer 1

2

Your shared library is where it should be, but maybe it did not get recognized and cached properly.

The command ldconfig scans all directories that are configured to contain such dynamic shared libraries and updates the library cache and links with what it found.

Simply run it like this:

sudo ldconfig

It should complete within a second or less and will fix problems related to missing shared library links and outdated library caches.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .