Compiling tesseract-ocr + training on centos 6

Compiling tesseract-ocr + training on centos 6

Installation steps are outlined here. However for  training additional steps are required

sudo yum install cairo-devel pango-devel libicu-devel

But I am still getting errors

  • No rule to make target `training-install':
  • Training tools WILL NOT be built because of missing c++11 support
  •  unicode/normalizer2.h: No such file or directory


Pay special attention to ./configure output. In my case I was using gcc 4.7 where as gcc 4.8 was required. Solution is was to install devtoolset-2 and then enabling gcc 4.8

$ wget -O /etc/yum.repos.d/devtools-2.repo
$ yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++

# now enable it
$ source /opt/rh/devtoolset-2/enable

# verify its gcc 4.8
$ gcc --version

# Install libicu 52
./configure && make && make install

Now proceed:

sudo make install
sudo ldconfig
make training
sudo make training-install

 Additional resources: