error while loading shared libraries: libpoppler.so.58: cannot open shared object file
Asked Answered
A

2

9

I compiled and install poppler-0.39.0 as per the instruction. By default header files went int \usr\local\include and lib files went into \usr\local\lib. pdftohtml is installed in \usr\local\bin.

Now when I tried to run pdftohtml it gives following error.

pdftohtml: error while loading shared libraries: libpoppler.so.58: cannot open shared object file: No such file or directory. 

Though libpoppler.so.58 is present in \usr\local\lib. Please help me.

Albertinealbertite answered 2/2, 2016 at 11:28 Comment(2)
This issue is resolved now.Albertinealbertite
Would you please share your solution? I am having this problem right now.Grefe
R
12

I had a similar problem on Ubuntu 18.04. After installation I got this error:

error while loading shared libraries: libpoppler.so.90: cannot open shared object file: No such file or directory

It turned out it was installed to /usr/local/lib:

Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/local/lib/libpoppler.so.90.0.0
-- Installing: /usr/local/lib/libpoppler.so.90
-- Installing: /usr/local/lib/libpoppler.so
-- Installing: /usr/local/lib/pkgconfig/poppler.pc
-- Installing: /usr/local/lib/pkgconfig/poppler-splash.pc
-- Installing: /usr/local/lib/pkgconfig/poppler-qt5.pc
-- Installing: /usr/local/lib/pkgconfig/poppler-glib.pc
-- Installing: /usr/local/lib/pkgconfig/poppler-cairo.pc
-- Installing: /usr/local/lib/pkgconfig/poppler-cpp.pc

but the system wasn't looking there.

To check if /usr/local/lib is in the default directories to search you can take a look at /etc/ld.so.conf.d/libc.conf.

If not already there you can add: /usr/local/lib

In my case this was already the case:

# libc default configuration
/usr/local/lib

But the cache at /etc/ld.so.cache wasn't updated.

To do so run (as root / sudo):

ldconfig

Solved the problem for me. Hope this may be helpful for someone!

Resemblance answered 3/9, 2019 at 10:7 Comment(2)
I had a similar problem with pdfgrep and libpopler.so.0. I wasn't able to check if the library of libpopler.so.0 was in the default directories but just running as sudo ldconfig was enough for meContradict
That feeling when you find the fix to your problem only to realize you have been here before and already upvoted the question and correct answer. Thank you sir, I am sorry I have but only 1 upvote to give.Lawsuit
A
1

Just had this very same error message displayed in an Amazon Linux 64 bits box. I guess pdftotext was looking for libpoppler.so.58 inside /usr/lib64/ but the lib was located on /usr/lib

So i ran the following commands (as superuser):

$ cp /usr/lib/libpoppler.so.58.0.0 /usr/lib64

$ ldconfig

You may have to replace directories to make that fit your case. I'm not sure if it's the most correct workaround but it worked.

Argentina answered 3/8, 2016 at 20:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.