正规网址
- 升级下基础包
sudo yum update
yum -y install automake
yum -y install libtool
yum install libpng-devel
- 这个过程最好用root安装,或者使用sudo命令
wget http://www.leptonica.org/source/leptonica-1.79.0.tar.gz
tar xzvf leptonica-1.79.0.tar.gz
cd leptonica-1.73
./configure
make
make install
- 安装tesseract
wget https://github.com/tesseract-ocr/tesseract/archive/3.04.01.tar.gz
mv 3.04.01.tar.gz tesseract-3.04.01.tar.gz
tar xzvf tesseract-3.04.01.tar.gz
cd tesseract-3.04.01/
./autogen.sh
./configure
make
make install
ldconfig
- 安装模型文件
wget https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.eng.tar.gz
wget https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.nld.tar.gz
wget https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.deu.tar.gz
tar xzvf tesseract-ocr-3.02.eng.tar.gz
tar xzvf tesseract-ocr-3.02.nld.tar.gz
tar xzvf tesseract-ocr-3.02.deu.tar.gz
sudo mv tesseract-ocr /usr/share/tesseract-ocr/tessdata
echo export TESSDATA_PREFIX=/usr/share/tesseract-ocr/tessdata >> .bashrc
- 安装ghostpdl
wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs920/ghostscript-9.20.tar.gz
tar xzvf ghostscript-9.20.tar.gz
cd ghostscript-9.20/
./autogen.sh
./configure
make
make install