tesseract-ocr `./configure` triggering Error "leptonica not found"

I was trying to install tesseract-ocr using these commands:

auto-apt run ./configure
make
checkinstall

Auto-apt and apt-file are installed on my Ubuntu 14.04 and up to date.

However, during the ./configure process I'm encountering the following error:

checking for strerror... yes
checking for vsnprintf... yes
checking for gethostname... yes
checking for strchr... yes
checking for memcpy... yes
checking for acos... yes
checking for asin... yes
checking for leptonica... configure: error: leptonica not found

Here is the full configure code: Code on Paste past.ofcode.org

I have already installed the 'leptonica-progs' package but still encountering the same error.

Any idea how to solve this?


Almost all programs that compile with a ./configure (such as this one, although it's triggered during the auto-apt process) are not looking for the actual binaries of the program the dependencies checks refer to. Instead, such systems are looking for development libraries and header files, and not the binaries. Those are usually kept in a separate package with a -dev suffix, in a similar name. To that end, we need to find the corresponding development headers for the library.

What leptonica-progs which you installed contains are sample programs for the Leptonica library, and not the actual headers/library files. Searching the packages system under Trusty, I think you will need to install the libleptonica-dev package to install the actual headers and library files for the library itself.

Run sudo apt-get install libleptonica-dev and then run the ./configure line again, and it shouldn't be triggering on the leptonica dependency anymore.