Tesseract:在linux远程主机中构建源代码的替代方法?

时间:2015-06-20 17:53:56

标签: java linux maven tesseract tess4j

我有一个使用Tess4j的Java Web项目。在我的本地Mac OS上,它的工作非常完美,因为我可能已经拥有了从源代码构建的Tesseract和Leptonica库

./config, make, make install

现在我想将项目部署到远程Linux主机(私有jvm),我创建了war文件,看到它包含适用于32位和64位的linux平台的各种tesseract和leptonica jar文件

mvn package -Dplatform.dependencies

但是在部署之后我仍然遇到了这个错误:

 .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])

这是什么问题?我没有机会在这个远程主机上使用命令行,那么这里缺少什么以及如何安装必需的库?

1 个答案:

答案 0 :(得分:-1)

我不知道这些库,但是从你的错误来看,你的linux看起来没有必要的binairies。

如果您使用的是Ubuntu,可以尝试:

sudo apt-get install libtesseract-dev leptonica-progs