7

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.
mt1022
  • 83
  • have you tried installing/reinstalling libpoppler? – Joshua Besneatte Aug 10 '18 at 03:35
  • @JoshuaBesneatte, Yeah. I tried reinstall libpoppler and libpoppler-glib8. Neither works. I also tried remove evince and reinstall it. Same thing :( – mt1022 Aug 10 '18 at 04:17
  • Please add output of apt-cache policy libpoppler-glib8 and ldd /usr/lib/x86_64-linux-gnu/libpoppler-glib.so.8 | grep not to the question. – N0rbert Aug 10 '18 at 09:07
  • @N0rbert, I appended those information to the question. I would be happy to provide any other information that might be helpful. – mt1022 Aug 10 '18 at 11:31
  • Did you tried to open other pdf-files from other locations? For example evince /usr/share/doc/shared-mime-info/shared-mime-info-spec.pdf. – N0rbert Aug 10 '18 at 11:38
  • @N0rbert, did you mean files in different directories? Yes, I tried and got the same error. It seems the document viewer could not open any pdf file on my disk now. I also added the screenshot for the shared-mime-info-spec.pdf in the question. – mt1022 Aug 10 '18 at 11:41
  • This might be of some help: https://bugs.launchpad.net/ubuntu/+source/evince/+bug/363355 – WinEunuuchs2Unix Aug 12 '18 at 19:20
  • @WinEunuuchs2Unix, I have read the post just now. And I didn't found any line containing libpoppler in the output of ldd $(which evince) on my computer. Does this look like the cause of the error? – mt1022 Aug 13 '18 at 01:41
  • What's odd is the failed to map segment from shared object error isn't presenting a reason, usually does. Try sudo apt purge libevview3-3 libevdocument3-4 & then sudo apt clean && sudo apt install evince – doug Aug 13 '18 at 18:35
  • @doug, I tried the exact command in your comment and the error still exists :( – mt1022 Aug 14 '18 at 01:18
  • @WinEunuuchs2Unix, that link is really helpful. When I browsed that page again, I checked my LD_LIBRARY_PATH and found it is pointing to a single dir. Somehow, there is another copy of libpoppler-cpp.so and libpoppler-glib.so.8. I moved libpopper* to another directory and the evince worked. It seems that dynamic linker searches LD_LIBRARY_PATH before /lib and /usr/lib. I think the bounty belongs to you if you have time to write an answer. Another thing is that I forget which software installed that copy. Removing that copy might affect it. – mt1022 Aug 14 '18 at 01:42
  • @mt1022 Thank you. There are still 5 days left on your bounty and I'm in the middle of general design for this project: https://askubuntu.com/questions/1063363/laptop-cpugpu-overheating-after-update-to-18-04-lts/1065125#1065125. I will post an answer over the next couple of days if that is acceptable? – WinEunuuchs2Unix Aug 14 '18 at 01:57
  • @WinEunuuchs2Unix, of course. Do it at your own pace. – mt1022 Aug 14 '18 at 02:04
  • 1
    @mt1022 I hope the answer is worded properly. Let me know if revisions are in order. Thanks. – WinEunuuchs2Unix Aug 14 '18 at 22:35

2 Answers2

5

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.

0

You can try reinstalling evince by performing:

sudo apt purge evince
sudo apt install evince
Fabby
  • 34,259
hypadr1v3
  • 101
  • Thanks for the time and effort. I tried the commands but the evince is not fixed. Same error remains. – mt1022 Aug 14 '18 at 01:20