I was following this instruction on this site to installing tesseract: https://github.com/tesseract-ocr/tesseract/wiki/Compiling

git clone https://github.com/tesseract-ocr/tesseract.git
cd tesseract
sudo make install
sudo ldconfig

But there is a problem in the last line and I got this error messages when I tried ldconfig:

/sbin/ldconfig.real: /usr/local/lib is not a known library type
/sbin/ldconfig.real: /usr/local/lib/pkgconfig is not a known library type

What's that error meaning and how can I fix it?

This is the content of /etc/ld.so.conf.d/libc.conf :

# libc default configuration
  • Did the make stage complete successfully? What is the output of ls -ld /usr/local/lib{,/pkgconfig}? Dec 13, 2016 at 17:05
  • Yes, I didn't see any errors in previous stages. drwxrwsr-x 1 root staff 1030 Dec 13 16:11 /usr/local/lib drwxr-sr-x 1 root staff 94 Dec 13 16:11 /usr/local/lib/pkgconfig Dec 13, 2016 at 19:28
  • run make test and post the result Oct 3, 2020 at 0:14

1 Answer 1


Yeah well you can't compile if your linker doesn't know where your libraries are. ldconfig is the utility that sets up your linked libraries and it's looking for you to tell it where your shared libraries are in /etc/ld.so.conf.d/libc.conf. The problem is that in that conf file you have a grand total of ONE path listed, but it's saying that's not even a real path.

You need to add the proper paths to where you keep your shared libraries to ld.so.conf.

Instructions says you need to have leptonica-dev package installed in order to have those shared libraries since what you're trying to build depends on them to compile. I'm assuming you didn't since it can't find the shared libraries.

I'm kind of new to this site but it's weird how I can get docked points for providing a perfectly legitimate answer. Doesn't leave much incentive to help if their reward system is all screwed up.

  • What do you mean by shared libraries? I have downloaded the tesseract and it's in this path: ' /home/m/tesseract ' , and also I have these paths in my computer: ' /usr/local/lib ' and ' /usr/local/lib/pkgconfig ' Dec 13, 2016 at 19:37
  • 1
    No, that's not the problem. The problem is that a directory name is being parsed as a library file name somehow. Dec 13, 2016 at 23:42
  • Yeah because you're telling it to in /etc/ld.conf.d/libc.conf that your libc shared libraries are in /usr/local/lib and it can't find them there and there's nothing there that the compiler identifies as a known library type.
    – A H
    Dec 14, 2016 at 4:08
  • Did you ensure the leptonica-dev package was installed first as per the instructions? If so, the shared libraries should be in that path.
    – A H
    Dec 14, 2016 at 4:10
  • Yes, I have installed leptonica 1.73 as how it says in method 2(with autoconf) in this site: leptonica.org/source/README.html, and its in this path: ' /home/m/leptonica-1.73' Dec 14, 2016 at 8:09

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.