sudo apt-get install autoconf automake libtool sudo apt-get install libpng12-dev sudo apt-get install libjpeg62-dev sudo apt-get install libtiff4-dev sudo apt-get install zlib1g-dev sudo apt-get install libicu-dev # (if you plan to make the training tools) sudo apt-get install libpango1.0-dev # (if you plan to make the training tools) sudo apt-get install libcairo2-dev # (if you plan to make the training tools)
./configure --prefix=/usr/local/leptonica make make install
sudo ldconfig
install tesseract
1 2 3 4 5
./autogen.sh ./configure --prefix=/usr/local/tesseract --with-extra-libraries=/usr/local/leptonica/lib make make install
chinese language data
将语言包解压后复制到share/tessdata
1 2 3 4 5 6 7 8 9 10
vagrant@aegir:~/tesseract$ sudo tar zxvf chi-tesseract-ocr.tar.gz tesseract-ocr/tessdata/chi_sim.traineddata
cd tesseract-ocr/tessdata sudo mv chi_sim.traineddata /usr/local/tesseract/share/tessdata/
export TESSDATA_PREFIX=/usr/local/tesseract/share # if your tessdata path is '/usr/local/share/tessdata' you have to use 'export TESSDATA_PREFIX='/usr/local/share/