1

I am unable to open pdf file using evince on Ubuntu 16.04. I get the following error:

evince: error while loading shared libraries: libexpat.so.1: failed to map segment from shared object

I have the above said library in my system and the LD_LIBRARY_PATH is also directed to it via symbolic link. I also tried re-installing the newest version of expat, but in vain. Could anyone help me out here?

As mentioned in a comment, here is the output of dpkg -S libexpat.so.1:

libexpat1:i386: /lib/i386-linux-gnu/libexpat.so.1.6.0
libexpat1:amd64: /lib/x86_64-linux-gnu/libexpat.so.1
libexpat1:amd64: /lib/x86_64-linux-gnu/libexpat.so.1.6.0
libexpat1:i386: /lib/i386-linux-gnu/libexpat.so.1

and following is the output of ldd $(which evince):

linux-vdso.so.1 =>  (0x00007ffef43a7000)
libevdocument3.so.4 => /usr/lib/x86_64-linux-gnu/libevdocument3.so.4 (0x00007ff373db9000)
libevview3.so.3 => /usr/lib/x86_64-linux-gnu/libevview3.so.3 (0x00007ff373b63000)
libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007ff373234000)
libgdk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007ff372f59000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007ff372d0d000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007ff372ae8000)
libcairo-gobject.so.2 => /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007ff3728df000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007ff3725cb000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007ff3723a9000)
libsecret-1.so.0 => /usr/lib/x86_64-linux-gnu/libsecret-1.so.0 (0x00007ff37215a000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007ff371dd2000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007ff371b7f000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007ff37186e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff371565000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff371348000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff370f7e000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007ff370d7a000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff370b60000)
libgstvideo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0 (0x00007ff3708da000)
libgstreamer-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007ff3705b0000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007ff3703a3000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff370069000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007ff36fe59000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007ff36fc53000)
libatk-bridge-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007ff36fa24000)
libepoxy.so.0 => /usr/lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007ff36f72f000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007ff36f519000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007ff36f2d6000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007ff36f0d3000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007ff36eec8000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007ff36ecbe000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007ff36eabb000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007ff36e8b8000)
libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007ff36e679000)
libwayland-cursor.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007ff36e471000)
libwayland-egl.so.1 => /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007ff36e26f000)
libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007ff36e060000)
libmirclient.so.9 => /usr/lib/x86_64-linux-gnu/libmirclient.so.9 (0x00007ff36ddb9000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007ff36dba7000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff36d99f000)
libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007ff36d796000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007ff36d4ee000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ff36d244000)
libpng12.so.0 => /usr/lib/x86_64-linux-gnu/libpng12.so.0 (0x00007ff36d01f000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007ff36ce1b000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007ff36cc11000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff36c9ef000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007ff36c7e5000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007ff36c504000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007ff36c2e2000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007ff36c0c7000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007ff36bebf000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ff36bc4f000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff374259000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff36ba4b000)
libgstbase-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0 (0x00007ff36b7e7000)
liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007ff36b567000)
libatspi.so.0 => /usr/lib/x86_64-linux-gnu/libatspi.so.0 (0x00007ff36b338000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007ff36b0ec000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007ff36ae8e000)
libexpat.so.1 => /usr/lib/x86_64-linux-gnu/libexpat.so.1 (0x00007ff374411000)
libmircommon.so.7 => /usr/lib/x86_64-linux-gnu/libmircommon.so.7 (0x00007ff36ac47000)
libmirprotobuf.so.3 => /usr/lib/x86_64-linux-gnu/libmirprotobuf.so.3 (0x00007ff36a9d5000)
libcapnp-0.5.3.so => /usr/lib/x86_64-linux-gnu/libcapnp-0.5.3.so (0x00007ff36a74d000)
libmircore.so.1 => /usr/lib/x86_64-linux-gnu/libmircore.so.1 (0x00007ff36a544000)
libboost_system.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0 (0x00007ff36a340000)
libprotobuf-lite.so.9 => /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9 (0x00007ff36a10f000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff369d83000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff369b6b000)
libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007ff369963000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff36975f000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff369559000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007ff369345000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007ff374387000)
libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007ff36911f000)
libboost_filesystem.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0 (0x00007ff368f07000)
libkj-0.5.3.so => /usr/lib/x86_64-linux-gnu/libkj-0.5.3.so (0x00007ff368cde000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007ff368abc000)
8
  • Does it say: Operation not permitted right after this error message? – Jos Jan 19 '19 at 11:58
  • On a different note, you might give Okular or Zathura a try :) – lordparthurnaax Jan 19 '19 at 12:20
  • Please add output of dpkg -S libexpat.so.1 and ldd $(which evince) to the question. – N0rbert Jan 19 '19 at 13:41
  • No @Jos it does not say anything after that error message. – SKR Jan 19 '19 at 18:54
  • Hey @N0rbert I have added the required output in the question. – SKR Jan 19 '19 at 18:56
1

I had a similar problem for evince to load the shared library libboost_filesystem.so.1.58.0.

Actually I had this library at /usr/local/lib/libboost_filesystem.so.1.58.0. But when I check the output via running

dpkg -S libboost_system.so.1.58.0

is

libboost-system1.58.0:amd64: /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0

And found there is not this library at /usr/lib/x86_64-linux-gnu/. So just copy the shared library to the target dir, via

sudo cp /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0 /usr/lib/x86_64-linux-gnu/

Then the problem was solved.

2
  • Why not by using ln -s? – Gryu Feb 11 '20 at 11:56
  • Yes. It may also work. – ccj5351 Feb 12 '20 at 5:31
0

The libexpat.so.1 library should be located in /lib/x86_64-linux-gnu/libexpat.so.1 (as you can see in the output of dpkg -S libexpat.so.1 and on packages.ubuntu.com).

Try to remove the libexpat.so.1 from /usr/lib/x86_64-linux-gnu/libexpat.so.1 with

sudo rm /usr/lib/x86_64-linux-gnu/libexpat.so.1

and then reinstall its package for sure with

sudo apt-get install --reinstall libexpat1:amd64

and finally check Evince with problematic PDF document.


Note: Usually many files and directories are installed from deb-packages with the help APT (and its utilities - dpkg, apt/apt-get) but in this particular case the /usr/lib/x86_64-linux-gnu/libexpat.so.1 is out of their control, so we need to remove it manually.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.