1 | | aaa |
| 1 | apt-get install autoconf-archive automake g++ libtool libleptonica-dev pkg-config |
| 2 | apt-get install git |
| 3 | |
| 4 | # pdfimages |
| 5 | apt-get install poppler-utils |
| 6 | |
| 7 | apt-get install libjpeg-dev libtiff-dev libpng-dev |
| 8 | |
| 9 | # if version 1.74+ of leptonica is not available in distro then compile from sources |
| 10 | mkdir /usr/lib/leptonica |
| 11 | cd /usr/lib/leptonica |
| 12 | wget http://www.leptonica.com/source/leptonica-1.74.4.tar.gz |
| 13 | gunzip leptonica-1.74.4.tar.gz |
| 14 | tar -xf leptonica-1.74.4.tar |
| 15 | cd leptonica-1.74.4 |
| 16 | ./configure |
| 17 | make |
| 18 | make install |
| 19 | |
| 20 | mkdir /usr/lib/tesseract |
| 21 | cd /usr/lib/tesseract |
| 22 | git clone https://github.com/tesseract-ocr/tesseract.git tesseract-ocr |
| 23 | cd tesseract-ocr/ |
| 24 | ./autogen.sh |
| 25 | ./configure |
| 26 | make |
| 27 | make install |
| 28 | ldconfig |
| 29 | |
| 30 | cd /usr/local/share/tessdata/ |
| 31 | wget https://github.com/tesseract-ocr/tessdata_fast/raw/master/script/Latin.traineddata |
| 32 | wget https://github.com/tesseract-ocr/tessdata_fast/raw/master/pol.traineddata |
| 33 | wget https://github.com/tesseract-ocr/tessdata_fast/raw/master/eng.traineddata |
| 34 | wget https://github.com/tesseract-ocr/tessdata_fast/raw/master/osd.traineddata |