6

The program evince complains that it can't find libfreetype.so.6; however I clearly have the file and its included in my LD_LIBRARY_PATH; furthermore I have another program which uses libfreetype6 and is able to run just fine. What's going on here?

jbud@jb-pc ~> evince
evince: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory

jbud@jb-pc ~> ldd /usr/bin/evince | grep freetype
libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x00007f912179d000)

jbud@jb-pc ~> file /usr/local/lib/libfreetype.so.6
/usr/local/lib/libfreetype.so.6: symbolic link to `libfreetype.so.6.11.1'

jbud@jb-pc ~> file /usr/local/lib/libfreetype.so.6.11.1
/usr/local/lib/libfreetype.so.6.11.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x21a4b8005e0c9a42af001b35fb984f4e25efc71c, not stripped

jbud@jb-pc ~> echo $LD_LIBRARY_PATH
/usr/lib/:/usr/lib64/:/usr/lib/x86_64-linux-gnu/:/usr/local/lib/

jbud@jb-pc ~> ldd jdrive/jstuff/work/personal/noengine/client | grep freetype
libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x00007feb5ac89000)

2 Answers 2

10

Creating a symbolic link to /usr/lib/libfreetype.so.6 should not be applied if the error was thrown by a 32-bit application on a 64-bit Linux distribution. The library could be left 'broken'.

What you want on a 64-bit system is to install the necessary 32-bit dependencies around your 32-bit application, so that it will be able to detect and use the already existing libfreetype.so.6. This differs per application, but commonly missing are these:

sudo apt-get install libgtk2.0-0:i386 libidn11:i386 libglu1-mesa:i386

And these may possibly fix the problem too:

sudo apt-get install libpangox-1.0-0:i386 libpangoxft-1.0-0:i386

Regards, Albert Kok

0

I was able to fix this problem however I'm still not entirely sure why this was a problem in the first place.

After running strace, I saw open("/usr/local/lib/libfreetype.so.6", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) which doesn't quite make sense since other programs (without sudo powers) which depended on libfreetype were able to run, and the permissions are set for read/write for all, also running evince under sudo didn't help either.

My apt-get of libfreetype placed the library in /usr/lib/x86_64-linux-gnu/libfreetype.so.6 but for some reason evince wasn't checking that folder (even though it was added to LD_LIBRARY_PATH). However I created a symbolic link to a folder which it does check sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so.6.10.1 /usr/lib/libfreetype.so.6 and now evince runs fine.

You must log in to answer this question.

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