Install tessrect-ocr in centos

Source: Internet
Author: User

Install tessrect-ocr in centos

Installation of tessrect-ocr and training tools in centos

Recently, we have to build a tessrect-ocr and training tool on the server to build a training webpage:

Http: // 115.159.205.168/ocr_php/public/index. php

The following problems were encountered during setup:

1. The tessrect-ocr installation package cannot be found.

2. The training tool cannot be installed.

1. solution:

[Cpp] view plaincopy
  1. Sudoyuminstalltesseract. i686

2. When installing the centos library, the training tool is not installed, so you need to install the source code:

1. Download the source code:

[Cpp] view plaincopy
  1. Wgethttps: // github.com/tesseract-ocr/tesseract/archive/master.zip

2. decompress:

Unzip tesseract-master.zip

3. Run the following command:

[Cpp] view plaincopy
  1. ./Autogen. sh
  2. ./Configure
  3. Make
  4. Sudomakeinstall
  5. Sudoldconfig
Now that the engine has been installed, install the training tool:

[Cpp] view plaincopy
  1. Maketraining
  2. Sudomaketraining-install

However, if your program displays this in./configure:

[Cpp] view plaincopy
  1. Configurationisdone.
  2. Youcannowbuildandinstalltesseractbyrunning:
  3. $ Make
  4. $ Sudomakeinstall
  5. Youcannotbuildtrainingtoolsbecauseofmissingdependency.
  6. Checkconfigureoutputfordetails.

The training tool cannot be installed because it does not produce the Makefile file.

[Cpp] view plaincopy
  1. Configure: creating./config. status
  2. Config. status: creatingMakefile
  3. Config. status: creatingtesseract. pc
  4. Config. status: creatingapi/Makefile
  5. Config. status: creatingccmain/Makefile
  6. Config. status: creatingopencl/Makefile
  7. Config. status: creatingccstruct/Makefile
  8. Config. status: creatingccutil/Makefile
  9. Config. status: creatingclassify/Makefile
  10. Config. status: creatingcube/Makefile
  11. Config. status: creatingcutil/Makefile
  12. Config. status: creatingdict/Makefile
  13. Config. status: creatingneural_networks/runtime/Makefile
  14. Config. status: creatingtextord/Makefile
  15. Config. status: creatingviewer/Makefile
  16. Config. status: creatingwordrec/Makefile
  17. Config. status: creatingtessdata/Makefile
  18. Config. status: creatingtessdata/configs/Makefile
  19. Config. status: creatingtessdata/tessconfigs/Makefile
  20. Config. status: creatingtesting/Makefile
  21. Config. status: creatingjava/Makefile
  22. Config. status: creatingjava/com/Makefile
  23. Config. status: creatingjava/com/google/Makefile
  24. Config. status: creatingjava/com/google/scrollview/Makefile
  25. Config. status: creatingjava/com/google/scrollview/events/Makefile
  26. Config. status: creatingjava/com/google/scrollview/ui/Makefile
  27. Config. status: creatingdoc/Makefile
  28. Config. status: creatingconfig_auto.h
  29. Config. status: config_auto.hisunchanged
  30. Config. status: executingdepfilescommands
  31. Config. status: executinglibtoolcommands
Obviously, no Makefile for training is generated.

The following solution:

1. view the information generated by./configure:

[Cpp] view plaincopy
  1. Checkinglimits. husability... yes
  2. Checkinglimits. hpresence... yes
  3. Checkingforlimits. h... yes
  4. Checkingmalloc. husability... yes
  5. Checkingmalloc. hpresence... yes
  6. Checkingformalloc. h... yes
  7. Checkingforstdbool. hthatconformstoc99... yes
  8. Checkingfor_Bool... no
  9. Checkingwhether #! Worksinshellscripts... yes
  10. CheckingforspecialCcompileroptionsneededforlargefiles... no
  11. Checkingfor_FILE_OFFSET_BITSvalueneededforlargefiles... 64
  12. Checkingforgetline... yes
  13. Checkingforwchar_t... yes
  14. Checkingforlonglongint... yes
  15. Checkingforoff_t... yes
  16. Checkingformbstate_t... yes
  17. Checkingforleptonica... yes
  18. Checkingforl_generateCIDataForPdfin-llept... yes
  19. Checkingleptonicaheadersversion> = 1. 71... yes
  20. Checkingunicode/uchar. husability... yes
  21. Checkingunicode/uchar. hpresence... yes
  22. Checkingforunicode/uchar. h... yes
  23. Checkingforpkg-config.../usr/bin/pkg-config
  24. Checkingpkg-configisatleastversion0.9.0... yes
  25. Checkingforpango... yes
  26. Checkingforcairo... yes

If Warning:... can't install training tools, follow the prompts below:

If the package cannot be found, run the following command:

[Cpp] view plaincopy
  1. Yumlist | gerpname
Find the corresponding package.

Here is a pack of old ICU versions, which requires source code installation:

1. Download the source code:

[Cpp] view plaincopy
  1. Wgethttp: // download.icu-project.org/files/icu4c/58.1/icu4c-58_1-src.tgz
2. Installation
[Cpp] view plaincopy
  1. ./Configure
  2. Make
  3. Sudomakeinstall


Then run./configure again.

If there is no Warning, but it still shows that the installation is not possible:

Modify the config. status File and add the training/Makefile in line 325.

Then go to the training Directory,

Run

[Cpp] view plaincopy
  1. Make
  2. Makeinstall

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.