Created
March 9, 2021 03:41
-
-
Save dthphuong/a1b7ec034a0065eb0d22dfa4758c4f28 to your computer and use it in GitHub Desktop.
Install TesseractOCR 4.1.1 on CentOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ================Install Leptonca library================ | |
# step 01 | |
yum install -y zlib-devel libpng-devel openjpeg-devel libtiff-devel libwebp-devel libtool automake | |
#step 02 | |
git clone https://github.com/DanBloomberg/leptonica | |
#step 03 | |
cd leptonica | |
export CC=${CC:-gcc} | |
sh ./autogen.sh | |
#step 04 | |
CFLAGS="-std=gnu99" | |
./configure CFLAGS="${CFLAGS}" | |
#step 05 | |
make | |
make install | |
# ================Install Tesseract 4.1.1================ | |
# step 01 | |
wget https://github.com/tesseract-ocr/tesseract/archive/4.1.1.tar.gz | |
# step 02 | |
tar xvf 4.1.1.tar.gz | |
cd tesseract-4.1.1 | |
export LIBLEPT_HEADERSDIR=/usr/local/include/leptonica | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib | |
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig | |
# step 03 | |
./autogen.sh | |
# step 04 | |
./configure --prefix= --with-extra-libraries=/usr/local/lib | |
# step 05 | |
make | |
sudo make install | |
sudo ldconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment