Last active
May 31, 2023 15:10
-
-
Save IaroslavR/834066ba4c0e25a27078 to your computer and use it in GitHub Desktop.
install last tesseract to Amazon Linux
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
sudo yum install autoconf aclocal automake | |
sudo yum install libtool | |
sudo yum install libjpeg-devel libpng-devel libtiff-devel zlib-devel | |
cd ~/downloads | |
wget http://www.leptonica.com/source/leptonica-1.72.tar.gz | |
tar -zxvf leptonica-1.72.tar.gz | |
cd leptonica-1.72 | |
./configure | |
make | |
sudo make install | |
cd .. | |
wget https://github.com/tesseract-ocr/tesseract/archive/3.04.00.tar.gz | |
tar -zxvf 3.04.00.tar.gz | |
cd tesseract-3.04.00/ | |
./autogen.sh | |
./configure | |
make | |
sudo make install | |
sudo ldconfig | |
cd /usr/local/share/tessdata | |
sudo wget http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz | |
sudo tar xvf tesseract-ocr-3.02.eng.tar.gz | |
sudo wget hhttp://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01.osd.tar.gz | |
sudo tar xvf tesseract-ocr-3.01.osd.tar.gz | |
export TESSDATA_PREFIX=/usr/local/share/ | |
sudo mv tesseract-ocr/tessdata/* . | |
sudo rm tesseract-ocr-3.02.eng.tar.gz | |
# we need osd for autorotate | |
sudo rm tesseract-ocr-3.01.osd.tar.gz | |
nano ~/.bash_profile | |
# Copy this line to the end: export TESSDATA_PREFIX=/usr/local/share/ | |
# Verify: | |
tesseract --list-langs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dockerfile: https://gist.github.com/codesankalp/c4d8e18421bf112a70406241f6d91ee9