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
- 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
- Wgethttps: // github.com/tesseract-ocr/tesseract/archive/master.zip
2. decompress:
Unzip tesseract-master.zip
3. Run the following command:
[Cpp] view plaincopy
- ./Autogen. sh
- ./Configure
- Make
- Sudomakeinstall
- Sudoldconfig
Now that the engine has been installed, install the training tool:
[Cpp] view plaincopy
- Maketraining
- Sudomaketraining-install
However, if your program displays this in./configure:
[Cpp] view plaincopy
- Configurationisdone.
- Youcannowbuildandinstalltesseractbyrunning:
- $ Make
- $ Sudomakeinstall
- Youcannotbuildtrainingtoolsbecauseofmissingdependency.
- Checkconfigureoutputfordetails.
The training tool cannot be installed because it does not produce the Makefile file.
[Cpp] view plaincopy
- Configure: creating./config. status
- Config. status: creatingMakefile
- Config. status: creatingtesseract. pc
- Config. status: creatingapi/Makefile
- Config. status: creatingccmain/Makefile
- Config. status: creatingopencl/Makefile
- Config. status: creatingccstruct/Makefile
- Config. status: creatingccutil/Makefile
- Config. status: creatingclassify/Makefile
- Config. status: creatingcube/Makefile
- Config. status: creatingcutil/Makefile
- Config. status: creatingdict/Makefile
- Config. status: creatingneural_networks/runtime/Makefile
- Config. status: creatingtextord/Makefile
- Config. status: creatingviewer/Makefile
- Config. status: creatingwordrec/Makefile
- Config. status: creatingtessdata/Makefile
- Config. status: creatingtessdata/configs/Makefile
- Config. status: creatingtessdata/tessconfigs/Makefile
- Config. status: creatingtesting/Makefile
- Config. status: creatingjava/Makefile
- Config. status: creatingjava/com/Makefile
- Config. status: creatingjava/com/google/Makefile
- Config. status: creatingjava/com/google/scrollview/Makefile
- Config. status: creatingjava/com/google/scrollview/events/Makefile
- Config. status: creatingjava/com/google/scrollview/ui/Makefile
- Config. status: creatingdoc/Makefile
- Config. status: creatingconfig_auto.h
- Config. status: config_auto.hisunchanged
- Config. status: executingdepfilescommands
- Config. status: executinglibtoolcommands
Obviously, no Makefile for training is generated.
The following solution:
1. view the information generated by./configure:
[Cpp] view plaincopy
- Checkinglimits. husability... yes
- Checkinglimits. hpresence... yes
- Checkingforlimits. h... yes
- Checkingmalloc. husability... yes
- Checkingmalloc. hpresence... yes
- Checkingformalloc. h... yes
- Checkingforstdbool. hthatconformstoc99... yes
- Checkingfor_Bool... no
- Checkingwhether #! Worksinshellscripts... yes
- CheckingforspecialCcompileroptionsneededforlargefiles... no
- Checkingfor_FILE_OFFSET_BITSvalueneededforlargefiles... 64
- Checkingforgetline... yes
- Checkingforwchar_t... yes
- Checkingforlonglongint... yes
- Checkingforoff_t... yes
- Checkingformbstate_t... yes
- Checkingforleptonica... yes
- Checkingforl_generateCIDataForPdfin-llept... yes
- Checkingleptonicaheadersversion> = 1. 71... yes
- Checkingunicode/uchar. husability... yes
- Checkingunicode/uchar. hpresence... yes
- Checkingforunicode/uchar. h... yes
- Checkingforpkg-config.../usr/bin/pkg-config
- Checkingpkg-configisatleastversion0.9.0... yes
- Checkingforpango... yes
- 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
- 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
- Wgethttp: // download.icu-project.org/files/icu4c/58.1/icu4c-58_1-src.tgz
2. Installation
[Cpp] view plaincopy
- ./Configure
- Make
- 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
- Make
- Makeinstall