Skip to content

Instantly share code, notes, and snippets.

@IaroslavR
Last active May 31, 2023 15:10
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save IaroslavR/834066ba4c0e25a27078 to your computer and use it in GitHub Desktop.
Save IaroslavR/834066ba4c0e25a27078 to your computer and use it in GitHub Desktop.
install last tesseract to Amazon Linux
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
@codesankalp
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment