leptonica
wget http://www.leptonica.org/source/leptonica-1.82.0.tar.gz
tar zxf leptonica-1.82.0.tar.gz
cd leptonica-1.82.0/
./configure && make && make install
yum install automake ca-certificates g++ git libtool make
wget https://github.com/tesseract-ocr/tesseract/archive/refs/tags/5.1.0.zip
unzip tesseract-5.1.0.zip
cd tesseract-5.1.0
./configure
报错:Your compiler does not have the necessary C++17 support!
处理:http://www.nanstar.top/p/wiki_1649403322861
报错:configure: error: Leptonica 1.74 or higher is required. Try to install libleptonica-dev package.
处理:
https://blog.csdn.net/xjmxym/article/details/79040514
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LIBLEPT_HEADERSDIR=/usr/local/include
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
source /etc/profile
继续安装
./configure --with-extra-includes=/usr/local/include --with-extra-libraries=/usr/local/include
make
make install
测试
tesseract --version