Tesseract installation - leptonica not found

4,014 views
Skip to first unread message

mara con

unread,
May 11, 2013, 12:49:36 PM5/11/13
to ocr...@googlegroups.com
I am fairly new to this and I am trying to install leptonica 1.68 (as part of my tesseract 3.02.02 installation) in my linux shared server (no root access); so far I did:

Installing leptonica dependencie:
  1. make dir /local/src
  2. chmod u+rwx /local/src
  3. downloaded leptonica-1.68.tar.gz in to /local/src
  4. tar -xzvf leptonica-1.68.tar.gz
  5. cd to /local/src/leptonica-1.68
  6. ./configure
  7. make
  8. after this trying make install but got error "canot create regular file" - permission denied (attached file); so I am not sure if installation was successful
So leptonica is installed right? (check attached config.log for leptonica installation).

After this I go ahead and try to compile tesserac:
  1. downloaded tesseract-ocr-3.02.02.tar.gz
  2. tar -xzvf tesseract-ocr-3.02.02.tar.gz
  3. cd to /local/src/tesseract-ocr
  4. ./configure
  5. Got the error:   checking for leptonica... configure: error: leptonica not found
I appreciate anyone that can help!

Mayte
config.log
leptonica_make_install_error.txt

Dan Bloomberg

unread,
May 12, 2013, 12:40:55 AM5/12/13
to ocr...@googlegroups.com
Mayte, you need root access to install a library in /usr/local/lib/.

  -- Dan



--
You received this message because you are subscribed to the Google Groups "ocropus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ocropus+u...@googlegroups.com.
To post to this group, send email to ocr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/ocropus/-/9sE5Lu6y7u0J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

mara con

unread,
May 12, 2013, 1:50:46 PM5/12/13
to ocr...@googlegroups.com
Hi Dan:

Thanks for your reply; I meant to say /home/maytemontanolistados/local/src; I compilled leptonica there and it looks like it installed correctly; but when trying to ./configure tesserac (same directory) it just cant find leptonica!;  how can I check if leptonica was properly installed in the first place (no sudo checkinstall  in my shared server).

Thanks a lot for your help!

Mayte

mara con

unread,
May 12, 2013, 1:55:27 PM5/12/13
to ocr...@googlegroups.com

Dan Bloomberg

unread,
May 12, 2013, 5:09:49 PM5/12/13
to ocr...@googlegroups.com
Mayte,

I suspect that when you typed 'make install', it failed to copy the leptonica library to /usr/local/lib  (and it's likely the header files weren't copied to /usr/local/include either).  Check those directories and make sure that the library and header files are there.  If they are, I have no idea why tesseract's configure can't find them.

  -- Dan


To view this discussion on the web visit https://groups.google.com/d/msg/ocropus/-/Ov4rNiuDBFcJ.

mara con

unread,
May 13, 2013, 10:51:47 AM5/13/13
to ocr...@googlegroups.com
Since I have no root access I intalled letonica in /home/maytemontanolistados/local/src/leptonica-1.68; so I try:

LIBLEPT_HEADERSDIR=/home/maytemontanolistados/local/src/leptonica-1.68/include/leptonica ./configure

and still no leptonica library found!


Thanks a lot!

Joshua Albert

unread,
Oct 17, 2013, 6:36:37 AM10/17/13
to ocr...@googlegroups.com
 I had a similar problem but figured it out. My reason for tessarct and hence leptonica was to compile pdfocr (https://github.com/gkovacs/pdfocr).

Downloaded source for Leptonica 1.69. Untared and since I don't have root permissions ran in leptonica directory.
$ ./configure --prefix=/home/albert/usr/  && make && make install;

This succesfully put the leptonica bin,lib, and include dirs in my ~/usr folder.

I have the bin directory in the PATH, the lib directory in the LD_LIBRARY_PATH, and the include directory in C_INCLUDE_PATH however this is not enough, nor neccessary, to configure tessaract.

In fact, tessaract has flags for finding leptonica. Here is what I used in tcsh:
$ ( setenv LIBLEPT_HEADERSDIR /home/albert/usr/include/leptonica ; setenv LDFLAGS -L/home/albert/usr/lib ; ./configure --prefix=/home/albert/usr )

The brackets set up a subshell in which I temporarily set the leptonica header dir, and location of library, before calling configure. After just run
$ make && make install

And it should work. Now I will continue compiling pdfocr and see if there are more requirments ;)

Cheers,
Josh


Reply all
Reply to author
Forward
0 new messages