我正在使用UnsatisfiedLinkError中的Tess4j (Linux)获取一个Tomcat+Ubuntu。
java.lang.UnsatisfiedLinkError: Error looking up function 'TessBaseAPICreate': /usr/lib/libtesseract.so.3.0.2: undefined symbol: TessBaseAPICreate
at com.sun.jna.Function.<init>(Function.java:208)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:536)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:513)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:499)库是通过apt-get安装tesseract-ocr安装的,Tess4j版本为2.0.0,一切似乎都在MacOS/OracleJDK1.7(64位)上运行,但在Ubuntu/Linux/OracleJDK1.7(64位)中却不起作用。
一些堆栈溢出搜索提供了错误版本或库不存在的线索,但是库就在那里.
ls -al /usr/lib/libtesseract.so.3.0.2
-rw-r--r-- 1 root root 4219544 Feb 25 2012 /usr/lib/libtesseract.so.3.0.2一个有解决方案或暗示的人?
发布于 2015-04-14 23:09:46
Tess4J 2.0与Tesseract 3.03RC兼容。因为您的版本是3.02,所以您需要Tess4J 1.x版本。
发布于 2016-12-26 11:02:40
这可能是tesseract的版本不兼容ubuntu版本。
对我来说,我的程序在win10中运行,而ubuntu 16没有错误,但是当在ubuntu12.04中出现这个错误时
也许我是通过命令安装tesseract的
sudo apt-get install tesseract-ocr但事实上,在我安装后的but 12流下
sudo apt-get install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev
sudo apt-get install gcc g++
sudo apt-get install autoconf automake libtool checkinstall从源安装Leptonica。编写时的最新版本是1.69.
wget http://www.leptonica.org/source/leptonica-1.69.tar.gz (if you can't,download leptonica-1.69.tar.gz from the internet)
tar -zxvf leptonica-1.69.tar.gz
cd leptonica-1.69
./configure
make
sudo checkinstall
sudo ldconfig然后从源代码.安装Tesseract OCR。
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz
(maybe you can download tesseract-ocr-3.02.02.tar.gz from the internet and then upload to the server )
tar -zxvf tesseract-ocr-3.02.02.tar.gz
cd tesseract-ocr
./autogen.sh
./configure
make (this may take a while)
sudo make install
sudo ldconfig在这之后我解决了这个问题
https://stackoverflow.com/questions/29626463
复制相似问题