How to install tesseract on CentOS 7


Tesseract is an optical character recognition engine for various operating systems. It is free software, released under the Apache License, Version 2.0, and development has been sponsored by Google since 2006.
In 2006, Tesseract was considered one of the most accurate open-source OCR engines then available.

repository: https://github.com/tesseract-ocr/tesseract

Step 1: Find available yum packages:

[root@tutorialspots ~]# yum list|grep tesseract
tesseract.x86_64                         3.04.00-3.el7                epel
tesseract-debuginfo.x86_64               3.02.02-4.el7.nux            nux-dextop
tesseract-devel.x86_64                   3.04.00-3.el7                epel
tesseract-langpack-afr.noarch            3.04.00-3.el7                epel
tesseract-langpack-amh.noarch            3.04.00-3.el7                epel
tesseract-langpack-ara.noarch            3.04.00-3.el7                epel
tesseract-langpack-asm.noarch            3.04.00-3.el7                epel
tesseract-langpack-aze.noarch            3.04.00-3.el7                epel
tesseract-langpack-aze_cyrl.noarch       3.04.00-3.el7                epel
tesseract-langpack-bel.noarch            3.04.00-3.el7                epel
tesseract-langpack-ben.noarch            3.04.00-3.el7                epel
tesseract-langpack-bod.noarch            3.04.00-3.el7                epel
tesseract-langpack-bos.noarch            3.04.00-3.el7                epel
tesseract-langpack-bul.noarch            3.04.00-3.el7                epel
tesseract-langpack-cat.noarch            3.04.00-3.el7                epel
tesseract-langpack-ceb.noarch            3.04.00-3.el7                epel
tesseract-langpack-ces.noarch            3.04.00-3.el7                epel
tesseract-langpack-chi_sim.noarch        3.04.00-3.el7                epel
tesseract-langpack-chi_tra.noarch        3.04.00-3.el7                epel
tesseract-langpack-chr.noarch            3.04.00-3.el7                epel
tesseract-langpack-cym.noarch            3.04.00-3.el7                epel
tesseract-langpack-dan.noarch            3.04.00-3.el7                epel
tesseract-langpack-dan_frak.noarch       3.04.00-3.el7                epel
tesseract-langpack-deu.noarch            3.04.00-3.el7                epel
tesseract-langpack-deu_frak.noarch       3.04.00-3.el7                epel
tesseract-langpack-dzo.noarch            3.04.00-3.el7                epel
tesseract-langpack-ell.noarch            3.04.00-3.el7                epel
tesseract-langpack-enm.noarch            3.04.00-3.el7                epel
tesseract-langpack-epo.noarch            3.04.00-3.el7                epel
tesseract-langpack-equ.noarch            3.04.00-3.el7                epel
tesseract-langpack-est.noarch            3.04.00-3.el7                epel
tesseract-langpack-eus.noarch            3.04.00-3.el7                epel
tesseract-langpack-fas.noarch            3.04.00-3.el7                epel
tesseract-langpack-fin.noarch            3.04.00-3.el7                epel
tesseract-langpack-fra.noarch            3.04.00-3.el7                epel
tesseract-langpack-frk.noarch            3.04.00-3.el7                epel
tesseract-langpack-frm.noarch            3.04.00-3.el7                epel
tesseract-langpack-gle.noarch            3.04.00-3.el7                epel
tesseract-langpack-glg.noarch            3.04.00-3.el7                epel
tesseract-langpack-grc.noarch            3.04.00-3.el7                epel
tesseract-langpack-guj.noarch            3.04.00-3.el7                epel
tesseract-langpack-hat.noarch            3.04.00-3.el7                epel
tesseract-langpack-heb.noarch            3.04.00-3.el7                epel
tesseract-langpack-hin.noarch            3.04.00-3.el7                epel
tesseract-langpack-hrv.noarch            3.04.00-3.el7                epel
tesseract-langpack-hun.noarch            3.04.00-3.el7                epel
tesseract-langpack-iku.noarch            3.04.00-3.el7                epel
tesseract-langpack-ind.noarch            3.04.00-3.el7                epel
tesseract-langpack-isl.noarch            3.04.00-3.el7                epel
tesseract-langpack-ita.noarch            3.04.00-3.el7                epel
tesseract-langpack-ita_old.noarch        3.04.00-3.el7                epel
tesseract-langpack-jav.noarch            3.04.00-3.el7                epel
tesseract-langpack-jpn.noarch            3.04.00-3.el7                epel
tesseract-langpack-kan.noarch            3.04.00-3.el7                epel
tesseract-langpack-kat.noarch            3.04.00-3.el7                epel
tesseract-langpack-kat_old.noarch        3.04.00-3.el7                epel
tesseract-langpack-kaz.noarch            3.04.00-3.el7                epel
tesseract-langpack-khm.noarch            3.04.00-3.el7                epel
tesseract-langpack-kir.noarch            3.04.00-3.el7                epel
tesseract-langpack-kor.noarch            3.04.00-3.el7                epel
tesseract-langpack-kur.noarch            3.04.00-3.el7                epel
tesseract-langpack-lao.noarch            3.04.00-3.el7                epel
tesseract-langpack-lat.noarch            3.04.00-3.el7                epel
tesseract-langpack-lav.noarch            3.04.00-3.el7                epel
tesseract-langpack-lit.noarch            3.04.00-3.el7                epel
tesseract-langpack-mal.noarch            3.04.00-3.el7                epel
tesseract-langpack-mar.noarch            3.04.00-3.el7                epel
tesseract-langpack-mkd.noarch            3.04.00-3.el7                epel
tesseract-langpack-mlt.noarch            3.04.00-3.el7                epel
tesseract-langpack-msa.noarch            3.04.00-3.el7                epel
tesseract-langpack-mya.noarch            3.04.00-3.el7                epel
tesseract-langpack-nep.noarch            3.04.00-3.el7                epel
tesseract-langpack-nld.noarch            3.04.00-3.el7                epel
tesseract-langpack-nor.noarch            3.04.00-3.el7                epel
tesseract-langpack-ori.noarch            3.04.00-3.el7                epel
tesseract-langpack-pan.noarch            3.04.00-3.el7                epel
tesseract-langpack-pol.noarch            3.04.00-3.el7                epel
tesseract-langpack-por.noarch            3.04.00-3.el7                epel
tesseract-langpack-pus.noarch            3.04.00-3.el7                epel
tesseract-langpack-ron.noarch            3.04.00-3.el7                epel
tesseract-langpack-rus.noarch            3.04.00-3.el7                epel
tesseract-langpack-san.noarch            3.04.00-3.el7                epel
tesseract-langpack-sin.noarch            3.04.00-3.el7                epel
tesseract-langpack-slk.noarch            3.04.00-3.el7                epel
tesseract-langpack-slk_frak.noarch       3.04.00-3.el7                epel
tesseract-langpack-slv.noarch            3.04.00-3.el7                epel
tesseract-langpack-spa.noarch            3.04.00-3.el7                epel
tesseract-langpack-spa_old.noarch        3.04.00-3.el7                epel
tesseract-langpack-sqi.noarch            3.04.00-3.el7                epel
tesseract-langpack-srp.noarch            3.04.00-3.el7                epel
tesseract-langpack-srp_latn.noarch       3.04.00-3.el7                epel
tesseract-langpack-swa.noarch            3.04.00-3.el7                epel
tesseract-langpack-swe.noarch            3.04.00-3.el7                epel
tesseract-langpack-syr.noarch            3.04.00-3.el7                epel
tesseract-langpack-tam.noarch            3.04.00-3.el7                epel
tesseract-langpack-tel.noarch            3.04.00-3.el7                epel
tesseract-langpack-tgk.noarch            3.04.00-3.el7                epel
tesseract-langpack-tgl.noarch            3.04.00-3.el7                epel
tesseract-langpack-tha.noarch            3.04.00-3.el7                epel
tesseract-langpack-tir.noarch            3.04.00-3.el7                epel
tesseract-langpack-tur.noarch            3.04.00-3.el7                epel
tesseract-langpack-uig.noarch            3.04.00-3.el7                epel
tesseract-langpack-ukr.noarch            3.04.00-3.el7                epel
tesseract-langpack-urd.noarch            3.04.00-3.el7                epel
tesseract-langpack-uzb.noarch            3.04.00-3.el7                epel
tesseract-langpack-uzb_cyrl.noarch       3.04.00-3.el7                epel
tesseract-langpack-vie.noarch            3.04.00-3.el7                epel
tesseract-langpack-yid.noarch            3.04.00-3.el7                epel
tesseract-osd.x86_64                     3.04.00-3.el7                epel

Step 2: install tesseract

[root@tutorialspots ~]# yum install tesseract -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     |  17 kB     00:00
 * base: mirrors.umflint.edu
 * epel: fedora-epel.mirror.lstn.net
 * extras: centos.den.host-engine.com
 * ius: dfw.mirror.rackspace.com
 * nux-dextop: mirror.li.nux.ro
 * remi-safe: mirror.bebout.net
 * updates: centos.den.host-engine.com
base                                                     | 3.6 kB     00:00
epel                                                     | 3.2 kB     00:00
extras                                                   | 3.4 kB     00:00
ius                                                      | 2.3 kB     00:00
mysql-connectors-community                               | 2.5 kB     00:00
mysql-tools-community                                    | 2.5 kB     00:00
mysql57-community                                        | 2.5 kB     00:00
nodesource                                               | 2.5 kB     00:00
nux-dextop                                               | 2.9 kB     00:00
remi-safe                                                | 2.9 kB     00:00
updates                                                  | 3.4 kB     00:00
(1/2): ius/x86_64/primary_db                               | 392 kB   00:00
(2/2): remi-safe/7/primary_db                              | 1.3 MB   00:01
Resolving Dependencies
--> Running transaction check
---> Package tesseract.x86_64 0:3.04.00-3.el7 will be installed
--> Processing Dependency: liblept.so.4()(64bit) for package: tesseract-3.04.00-
3.el7.x86_64
--> Running transaction check
---> Package leptonica.x86_64 0:1.72-2.el7 will be installed
--> Processing Dependency: libgif.so.4()(64bit) for package: leptonica-1.72-2.el
7.x86_64
--> Running transaction check
---> Package giflib.x86_64 0:4.1.6-9.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package            Arch            Version                 Repository     Size
================================================================================
Installing:
 tesseract          x86_64          3.04.00-3.el7           epel           11 M
Installing for dependencies:
 giflib             x86_64          4.1.6-9.el7             base           40 k
 leptonica          x86_64          1.72-2.el7              epel          928 k

Transaction Summary
================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 12 M
Installed size: 43 M
Downloading packages:
(1/3): giflib-4.1.6-9.el7.x86_64.rpm                       |  40 kB   00:00
(2/3): leptonica-1.72-2.el7.x86_64.rpm                     | 928 kB   00:00
(3/3): tesseract-3.04.00-3.el7.x86_64.rpm                  |  11 MB   00:00
--------------------------------------------------------------------------------
Total                                               14 MB/s |  12 MB  00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : giflib-4.1.6-9.el7.x86_64                                    1/3
  Installing : leptonica-1.72-2.el7.x86_64                                  2/3
  Installing : tesseract-3.04.00-3.el7.x86_64                               3/3
  Verifying  : tesseract-3.04.00-3.el7.x86_64                               1/3
  Verifying  : giflib-4.1.6-9.el7.x86_64                                    2/3
  Verifying  : leptonica-1.72-2.el7.x86_64                                  3/3

Installed:
  tesseract.x86_64 0:3.04.00-3.el7

Dependency Installed:
  giflib.x86_64 0:4.1.6-9.el7           leptonica.x86_64 0:1.72-2.el7

Complete!

Step 3: install more language

[root@tutorialspots ~]# yum install -y tesseract-langpack-rus
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.umflint.edu
 * epel: fedora-epel.mirror.lstn.net
 * extras: centos.den.host-engine.com
 * ius: dfw.mirror.rackspace.com
 * nux-dextop: mirror.li.nux.ro
 * remi-safe: mirror.bebout.net
 * updates: centos.den.host-engine.com
Resolving Dependencies
--> Running transaction check
---> Package tesseract-langpack-rus.noarch 0:3.04.00-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                      Arch         Version             Repository  Size
================================================================================
Installing:
 tesseract-langpack-rus       noarch       3.04.00-3.el7       epel       7.1 M

Transaction Summary
================================================================================
Install  1 Package

Total download size: 7.1 M
Installed size: 38 M
Downloading packages:
tesseract-langpack-rus-3.04.00-3.el7.noarch.rpm            | 7.1 MB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : tesseract-langpack-rus-3.04.00-3.el7.noarch                  1/1
  Verifying  : tesseract-langpack-rus-3.04.00-3.el7.noarch                  1/1

Installed:
  tesseract-langpack-rus.noarch 0:3.04.00-3.el7

Complete!

You tessdata-dir: /usr/share/tesseract/tessdata

centos tessdata-dir

Recent search terms:

  • how to install tesseract 4 on centos 7

Leave a Reply