Ubuntu – Document viewer (evince) couldn’t open pdf when system upgraded from 16.04 to 18.04

18.04evincepdfupgrade

I just upgraded the system from 16.04 LTS to 18.04 LTS. Everything works fine until I tried to open pdf. It seems the document viewer could not open pdf files that look normal previously. However, those pdf files are OK as I can view them in chrome in 18.04. Any idea on how to fix the document viewer?

Here is the error message:

"Failed to load backend for 'applicaton/pdf': libpoppler-glib.so.8:
failed to map segment from shared object

Here is a snapshot of the screen:
enter image description here

Another one:
enter image description here

Following the suggestions of N0rbert, some additional information is attached as follows.

First, apt-cache policy libpoppler-glib8:

$ apt-cache policy libpoppler-glib8
libpoppler-glib8:
  Installed: 0.62.0-2ubuntu2.1
  Candidate: 0.62.0-2ubuntu2.1
  Version table:
 *** 0.62.0-2ubuntu2.1 500
        500 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates/main amd64 Packages
        500 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     0.62.0-2ubuntu2 500
        500 http://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic/main amd64 Packages

The output of ldd /usr/lib/x86_64-linux-gnu/libpoppler-glib.so.8 | grep not is empty.


Note:

  • For those who have similar issue, I found both Foxit Reader and
    qpdfview work fine on my computer and I finally decide to use Foxit
    reader as a workaround as its UI is more friendly in my opinion.
  • Feel free to comment if additional information is required. I'll
    respond as soon as possible.

Best Answer

Library path incorrect

Nine years ago on this bug report it was discovered:

installed a version without using the packaging system and it's taking over the ubuntu build and breaking your installation

" libpoppler-glib.so.4 => /usr/local/lib/libpoppler-glib.so.4 (0xb78b0000)"

clean that and it should be working correctly

The solution was to remove:

sudo rm -f /usr/local/lib/libpoppler-glib.so.4

Nine years later and you have a similar problem. Checking LD_LIBRARY_PATH is pointing to a single dir rather than the full path list. There is an incorrect version of libpoppler-cpp.so and libpoppler-glib.so.8 there.

Moving libpopper* to another directory allowed evince to work with the proper dynamic linker searches in /lib and /usr/lib.