安装依赖
sudo apt-get install g++ # or clang++ (presumably)
sudo apt-get install autoconf automake libtool
sudo apt-get install autoconf-archive
sudo apt-get install pkg-config
sudo apt-get install libpng12-dev
sudo apt-get install libjpeg8-dev
sudo apt-get install libtiff5-dev
sudo apt-get install zlib1g-dev
安装训练库
sudo apt-get install libicu-dev
sudo apt-get install libpango1.0-dev
sudo apt-get install libcairo2-dev
下载leptonica
地址 http://www.leptonica.com/download.html
编译安装
tar -xzvf leptonica-1.74.4.tar.gz
cd leptonica-1.74.4.tar.gz
./configure --profix=/usr/local/leptonica
make
sudo make install
下载tess4j
地址 https://sourceforge.net/projects/tess4j/
编译安装
tar -xvf Tesseract3.04.00.tar.gz
cd tesseract-3.04.00/
./autogen.sh
./configure
make && make install
运行如果缺少某个so文件
就在/etc/ld.so.conf这个文件中
添加”/usr/local/lib“这行
然后执行命令
ldconfig