CentOS - libtesseract.so.3 error

Asked by AMS

I have read many posts with similar questions and I have tried to use them as a guide but I have been unable to overcome my issue with trying to get Sikuli to work on CentOS 6.x.

From what I can tell this is an issue with Tesseract but I can't figure out how to correct it. I have performed the following thus far...:

     Installed CentOS 6.x
     Installed some prereqs (dev tools, gcc, cmake, etc)
     Installed OpenCV 2.2
     Installed Leptonica
     Installed Tesseract 3.02.02
     Installed Sikuli 1.0.1

When I run ./runIDE -d 3 -c I get the following output:

running SikuliX-IDE: -Xmx512M -Dapple.laf.useScreenMenuBar -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine
-jar ./sikuli-ide.jar -d 3 -c
[debug] Running on Java 7 (1.7.0_45-mockbuild_2013_11_22_18_30-b00)
[debug] --- Sikuli parameters ---
[debug] 1: -d
[debug] 2: 3
[debug] 3: -c
[debug] init user preferences
[debug] locale: en_US
[debug] ResourceLoaderBasic: SikuliX Package Build: 1.0.1 12SEP2013160242
[debug] ResourceLoaderBasic: check: we are running on arch: amd64
[debug] ResourceLoaderBasic: check: using Java at: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.45.x86_64/jre/
[debug] ResourceLoaderBasic: check: Exists libs folder at location of jar? YES: /home/user/Sikuli/
[debug] ResourceLoaderBasic: checkLibsDir: /home/user/Sikuli/libs
[debug] ResourceLoaderBasic: loadLib: JXGrabKey
[debug] ResourceLoaderBasic: loadLib: Found: JXGrabKey
[debug] ResourceLoaderBasic: loadLib: Now loaded: JXGrabKey
[debug] ResourceLoaderBasic: checkLibsDir: Using libs at: /home/user/Sikuli/libs
[debug] Screen: initScreens: basic initialization (1 Screen(s) found)
[debug] *** monitor configuration (primary: 0) ***
[debug] Screen 0: S(0)[0,0 1583x687]
[debug] *** end monitor configuration ***
[debug] [I18N] menuShowThumbs
[debug] ResourceLoaderBasic: loadLib: Is already loaded: JXGrabKey
[debug] Sikuli-IDE startup: 1519
[debug] MenuAction.doLoad
[debug] SikuliX Jython Support Build: 1.0.1 12SEP2013160248
[debug] SikuliEditorKit.read
[debug] ImageLocator: found 1405605172817.png in /home/user/Desktop/test.sikuli/
[debug] FileManager: tempfile create: /tmp/sikuli-4166345826942410403.png
[debug] FileManager: tempfile create: /tmp/sikuli-4490415893266343011.py
[debug] JythonScriptRunner: : executeScriptHeader: adding SikuliX Lib path to sys.path
/home/user/Sikuli/sikuli-ide.jar/Lib
[debug] Jython: sikuli: __init__: entering
[debug] Jython: sikuli: Sikuli: entering
[debug] Jython: sikuli: Sikuli: constants
[debug] Jython: sikuli: Sikuli: import Region
[debug] Jython: sikuli: Sikuli: import Screen
[debug] Jython: sikuli: Sikuli: Env.addHotkey
[debug] Jython: sikuli: Sikuli: import Match
[debug] Jython: sikuli: Sikuli: import Pattern
[debug] Jython: sikuli: Sikuli: import Location
[debug] Jython: sikuli: Sikuli: import ScreenUnion
[debug] Jython: sikuli: Sikuli: import Finder
[debug] ResourceLoaderBasic: loadLib: VisionProxy
[debug] ResourceLoaderBasic: loadLib: Found: VisionProxy
[error] ResourceLoaderBasic: loadLib: Fatal Error 110: loading: libVisionProxy.so
[error] ResourceLoaderBasic: loadLib: Since native library was found, it might be a problem with needed dependent libraries
/home/user/Sikuli/libs/libVisionProxy.so: libtesseract.so.3: cannot open shared object file: No such file or directory
[error] Terminating SikuliX after a fatal error(110)! Sorry, but it makes no sense to continue!
If you do not have any idea about the error cause or solution, run again
with a Debug level of 3. You might paste the output to the Q&A board.
[debug] SikuliXFinal: cleanUp: 0

I then tried running the ./makeVisionProxy and then copied the libVisionProxy.so as the README stated but no change.

Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

check the loader path at runtime: might be, that the folder containing the .so is not included.

… or it may be a problem with dependencies of libtesseract: check the external refs with the appropriate tool.

Revision history for this message
AMS (solak1984) said :
#2

If you dont mind, can you explain what you mean by the loader path? I did add the TESSDATA_PREFIX to my profile pointing to the tesseract-ocr directory.

I also do not know what you mean when you stated to check the external refs.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

the problem you have happens at load time of the native libraries.

You have to find out, what dependent libraries are not found. To help you with this, that are tools, that analyse a library like libtesseract.3.so or even libVisionProxy.so and show which libraries are needed.

On Linux there is a global LD_PATH, that lists the paths to be used for searching libraries. at runtime you might add missing paths, that you have found out in the step before.

More help I cannot give you, since I am not a Linux expert and hence do know nothing about the specifics of CentOS.

Revision history for this message
AMS (solak1984) said :
#4

I just thought I would post my results as I was able to get this to work. As it was mentioned I took a look at my environment and added the following to my "/etc/profile"

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH=$PKG_CONFIG_PATH:/usr/local/lib
export TESSDATA_PREFIX=/home/user/Downloads/tesseract-ocr

I am putting together a script which would install OpenCV, Tesseract and Sikuli with all needed dependencies for CentOS 6.5. I will post when its completed.

Revision history for this message
AMS (solak1984) said :
#5

# Correction to the previous comment. The middle row should read:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Revision history for this message
RaiMan (raimund-hocke) said :
#6

Great - thanks.

I made a bug for this question (see at the top: Related Bugs).

please continue there, since you can add attachments there.

I set this question to solved for now.