Forked from IaroslavR/gist:834066ba4c0e25a27078
Last active
October 27, 2024 12:42
-
-
Save chrisjz/9dad487c341c754d6d6099bd816f749d to your computer and use it in GitHub Desktop.
install last tesseract to Amazon Linux
This file contains hidden or 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 https://github.com/DanBloomberg/leptonica/releases/download/1.74.3/leptonica-1.74.3.tar.gz | |
tar -zxvf leptonica-1.74.3.tar.gz | |
cd leptonica-1.74.3 | |
./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 -O tesseract-ocr-3.02.eng.tar.gz https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.eng.tar.gz/download | |
sudo tar xvf tesseract-ocr-3.02.eng.tar.gz | |
sudo wget -O tesseract-ocr-3.01.osd.tar.gz https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.01.osd.tar.gz/download | |
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 | |
# Copying this line to the end of ~/.bash_profile: export TESSDATA_PREFIX=/usr/local/share/ | |
sudo echo 'export TESSDATA_PREFIX=/usr/local/share/' >> ~/.bash_profile | |
# Verify: | |
tesseract --list-langs |
Thanks @kaiwalya4850 , I've updated the URL
hey there, the following two commands also don't work due to the update - they need to be changed
tar -zxvf leptonica-1.72.tar.gz
cd leptonica-1.72
to
tar -zxvf leptonica-1.74.3.tar.gz
cd leptonica-1.74.3
Thanks @oof2win2 , I've applied those changes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this no longer works (i believe they have moved it)
wget http://www.leptonica.com/source/leptonica-1.72.tar.gz
replace with this
wget https://github.com/DanBloomberg/leptonica/releases/download/1.74.3/leptonica-1.74.3.tar.gz