Install Tesseract 4.0 in Ubuntu 16.04
Bing 16 Jul 2017This post expects you to be familiar with compiling software on your Ubuntu operation system.
Configure compiling environment
sudo apt-get install -y build-essential &&\
sudo apt-get install -y python-dev &&\
sudo apt-get install -y python &&\
sudo apt-get install -y python-pip &&\
sudo apt-get install -y python-setuptools &&\
sudo pip install -y cython
Upgrade g++5
sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&\
sudo apt-get update &&\
sudo apt-get upgrade &&\
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
Install dependency package
sudo apt-get install -y autoconf automake libtool &&\
sudo apt-get install -y autoconf-archive &&\
sudo apt-get install -y pkg-config &&\
sudo apt-get install -y libpng12-dev &&\
sudo apt-get install -y libjpeg8-dev &&\
sudo apt-get install -y libtiff5-dev &&\
sudo apt-get install -y zlib1g-dev &&\
sudo apt-get install -y libicu-dev &&\
sudo apt-get install -y libpango1.0-dev &&\
sudo apt-get install -y libcairo2-dev
Install Leptonica 1.74
Install it from source code
-
Download the source code from Leptonica
-
Following the instructions to install it.
sudo tar xf leptonica-1.74.tar.gz &&\ cd leptonica-1.74 &&\ sudo ./configure &&\ sudo make &&\ sudo make install
Install it from Unofficial Ubuntu PPAs
sudo add-apt-repository ppa:alex-p/tesseract-ocr &&\
sudo apt-get update &&\
sudo apt-get install -y libleptonica-dev &&\
sudo ldconfig
Install Tesseract 4.0
-
Checkout code from Github
-
Compiling it and install it.
sudo sh autogen.sh &&\ ./configure &&\ LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make &&\ sudo make install &&\ sudo make install -langs &&\ sudo ldconfig
Tags:
Stats:
0 comments
Prev:
Git clone code from Github without authentication
Next:
Deploying Deep Learning development environment on Ubuntu 16.04