Tess4J On Oracle Enterpirse Linux -Native library (linux-x86-64/libtesseract.so) not found in resource path

2,801 views
Skip to first unread message

igor ognjanovic

unread,
Feb 10, 2016, 8:31:00 AM2/10/16
to tesseract-ocr

I have problems during configuration and operation of the tess4j Oracle Enterprise Linux.

I installed tesseract3.04 and leptonica 1.71 . Tesseract I installed that I download a .tarfile unpacked and do

./configure 
make 
make install

# tesseract -v
tesseract 3.04.00
 leptonica-1.71

When I run the application in netbeans receive the following error :

 java.lang.UnsatisfiedLinkError : Unable to load library ' tesseract ': Native library ( linux - x86 / libtesseract.so )...

i copy libteseract.co in /tmp/tess4j/linux-x86 When i set Property jna.library.path to usr/local/lib I tried to export LD_LIBRARY_PATH than again I have the same error.

Юлия Б

unread,
Feb 11, 2016, 1:31:34 PM2/11/16
to tesseract-ocr
Try to follow this instructions.

http://ubuntuforums.org/showthread.php?t=1647350

среда, 10 февраля 2016 г., 15:31:00 UTC+2 пользователь igor ognjanovic написал:

Юлия Б

unread,
Feb 13, 2016, 4:46:05 AM2/13/16
to tesseract-ocr
Hi again. Have you fixed this error? 


среда, 10 февраля 2016 г., 15:31:00 UTC+2 пользователь igor ognjanovic написал:

viraf

unread,
Feb 17, 2016, 10:36:04 PM2/17/16
to tesseract-ocr
Not sure if you have already solved the issue.  On non windows platforms, Tess4J tries to load a library named "tesseract".  To address tthis, I created a symlink usr/local/lib/tesseract -> /usr/local/lib/libtesseract.so.3.0.4.  I also added /usr/local/lib to /etc/ld.so.conf to load the library.  I also set jna.library.path.

Hope this solves your issues. 

- viraf
Message has been deleted

igor ognjanovic

unread,
Feb 24, 2016, 4:40:22 AM2/24/16
to tesseract-ocr
Hello. I solved the problem I installed the 32bit tesseract from epel repository . but now I have a problem when start tess4j :

ERROR net.sourceforge.tess4j.Tesseract - Invalid calling convention 63
java.lang.IllegalArgumentException: Invalid calling convention 63
at com.sun.jna.Native.createNativeCallback(Native Method) ~[jna.jar:4.2.1 (b0)]
at com.sun.jna.CallbackReference.<init>(CallbackReference.java:239) ~[jna.jar:4.2.1 (b0)]
at com.sun.jna.CallbackReference.getFunctionPointer(CallbackReference.java:413) ~[jna.jar:4.2.1 (b0)]
at com.sun.jna.CallbackReference.getFunctionPointer(CallbackReference.java:395) ~[jna.jar:4.2.1 (b0)]
at com.sun.jna.Function.convertArgument(Function.java:541) ~[jna.jar:4.2.1 (b0)]
at com.sun.jna.Function.invoke(Function.java:305) ~[jna.jar:4.2.1 (b0)]
at com.sun.jna.Library$Handler.invoke(Library.java:236) ~[jna.jar:4.2.1 (b0)]
at com.sun.proxy.$Proxy1.gsapi_set_stdio(Unknown Source) ~[na:na]
at org.ghost4j.Ghostscript.initialize(Ghostscript.java:323) ~[ghost4j-1.0.0.jar:na]
at net.sourceforge.tess4j.util.PdfUtilities.convertPdf2Png(PdfUtilities.java:109) ~[classes/:na]
at net.sourceforge.tess4j.Tesseract.createDocuments(Tesseract.java:535) ~[classes/:na]
at OCRScanner.main(OCRScanner.java:51) [classes/:na]
Reply all
Reply to author
Forward
Message has been deleted
0 new messages