Tesseract: An alternative to building a source in linux remote host?

747 views Asked by At

I have a Java Web project using Tess4j. On my local Mac OS it works perfect because probably I already have the Tesseract and Leptonica libraries built from source by

./config, make, make install

Now I want to deploy the project to a remote Linux host(private jvm), I created war file and saw that it contains various tesseract and leptonica jar files for the linux platform for 32 and 64 bit

mvn package -Dplatform.dependencies

But after deploy still I got this error:

 .UnsatisfiedLinkError: Unable to load library 'tesseract': Native library (linux-x86-64/libtesseract.so) not found in resource path ([file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/classes/, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/aopalliance-1.0.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/commons-beanutils-1.8.3.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/commons-io-1.3.1.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/commons-logging-1.1.3.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/ghost4j-0.5.1.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/itext-2.1.7.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/jai-imageio-core-standalone-1.2-pre-dr-b04-2011-07-04.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/jna-4.1.0.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/log4j-1.2.15.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/platform-3.5.2.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/spring-aop-4.1.1.RELEASE.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/spring-beans-4.1.1.RELEASE.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/spring-context-4.1.1.RELEASE.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/spring-core-4.1.1.RELEASE.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/spring-expression-4.1.1.RELEASE.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/spring-web-4.1.1.RELEASE.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/spring-webmvc-4.1.1.RELEASE.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/tess4j-2.0.0.jar, file:/home/jakarta/jvm/apache-tomcat-7.0.59/domains/yumq.nl/ocr1/WEB-INF/lib/xmlgraphics-commons-1.4.jar])

What is the problem here? I don't have a chance to use command line on this remote host, So what is missing here and how do I get the necessaray libraries installed in place?

1

There are 1 answers

9
bodyjares On

I don't know these libraries but from your error it looks like your linux don't have the required binairies.

If you are on Ubuntu you can try:

sudo apt-get install libtesseract-dev leptonica-progs