How to install Tesseract in AWS Linux? One of our team member tried the below commands a few months ago.
cd /opt
mkdir tesseract
chmod 0755 tesseract
cd tesseract
yum install libpng-devel
yum install libtiff-devel
yum install libjpeg-devel
wget http://www.leptonica.com/source/leptonica-1.71.tar.gz
tar xzf leptonica-1.71.tar.gz
cd leptonica-1.71
./configure
make
make install
export LIBLEPT_HEADERSDIR=/usr/local/include # Add to .profile
cd /opt/tesseract
yum install libtool
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz
tar xzf tesseract-ocr-3.02.02.tar.gz # Makes tesseract-ocr directory, no version.
cd tesseract-ocr
./autogen.sh
./configure --with-extra-libraries=/opt/tesseract
make
sudo make install
sudo ldconfig
cd /opt/tesseract
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz
tar xzf tesseract-ocr-3.02.eng.tar.gz # Makes tesseract-ocr/tessdata directory.
sudo cp ./tessdata/* /usr/local/share/tessdata/ | for each
$>rm –rf tessdata
export TESSDATA_PREFIX=/opt/tesseract/tesseract-ocr/
But these commands didn't helped. When we are ran Tesseract OCR for PHP, we got the below error.
Error! The command "tesseract" was not found. Make sure you have Tesseract OCR installed on your system
It will be helpful if someone shares any tutorial/documentation links.
/usr/local/share/tessdata/
), so try running your command from there. – John Rotensteintesseract
is in the EPEL repo fedoraproject.org/wiki/EPEL ... for el6, el7, el8 . – Knud Larsen