VirtualBox (after all, java is wonderful.) Disk image of CentOS6.3 (iso)
You will be asked if you want to test the build first, but skip the test. For some reason I can't move on. After that, proceed as it is. Install with the Desktop version.
At first, the net is not connected, so set it. Start the terminal and switch to superuser
Play with the following files with vi. (Insert mode with i, escape with esc, overwrite with: wq!)
ONBOOT = yes Changed #no to yes
Restart the service.
service netowrk restart
Check if FireFox can be connected, and if it is connected, it's OK. (Depending on the hardware, it may be necessary to install a driver.)
Start the terminal, Superuser switching
#Because it also passes to javac. yum install java-1.8.0-openjdk-devel
Eclipse Neon Install eclipse neon (version error in drawing library if it is more than this) https://www.eclipse.org/downloads/packages/release/neon/3
I'm assuming you're using tess4j in your Maven project.
#Development tools yum -y groupinstall "development tools" #Peripheral library yum -y install libpng-devel libtiff-devel libjpeg-devel #Tools needed for compilation yum -y install centos-release-scl #compiler yum -y install devtoolset-7-gcc-c++
This needs to be done in the terminal every time unless set in the config file.
cd /usr/src/ wget http://ftpmirror.gnu.org/autoconf-archive/autoconf-archive-2019.01.06.tar.xz tar xvvfJ autoconf-archive-2019.01.06.tar.xz cd autoconf-archive-2019.01.06/ ./configure --prefix=/usr make make install
cd /usr/src/ wget http://leptonica.org/source/leptonica-1.77.0.tar.gz tar xvvfz leptonica-1.77.0.tar.gz cd leptonica-1.77.0/ ./configure --prefix=/usr/local/ make make install
This time 4.1.1-rc2
cd /usr/src/ wget https://github.com/tesseract-ocr/tesseract/archive/4.1.1-rc2.tar.gz tar xvvfz 4.1.1-rc2.tar.gz #For some reason, the tesseract name is missing lol. Only this version. cd tesseract-4.1.1-rc2 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh ./configure --prefix=/usr/local/ --with-extra-libraries=/usr/local/lib/ --disable-openmp make install
When it's done successfully, it's all in / usr / local / lib / Create a "linux-x86-64" folder anywhere you like Copy in this. cp file file... dir
Copy this directly under the src / main / resources folder of the project that uses tesseract of eclipse
First, somehow set the locale. (https://github.com/nguyenq/tess4j/issues/105)
In this state, type the startup file path of eclipse into the terminal and start it.
If you can compile your own java program, Includes jar, tessdata folder, and compiled "linux-x86-64" folder.
When testing in a terminal in a similar environment export LC_ALL = C, then command.
-Add an option at compile time to avoid openmp linker errors. (Https://github.com/tesseract-ocr/tesseract/issues/2323) -Create a linux-x86-64 folder, put all the compiled files in it, and copy it to the resource folder instead of directly under the project folder. -Every time you compile the tesseract library (with the above method), you need "source / opt / rh / devtoolset-7 / enable" in the terminal. -After using the locale command to "export LC_ALL = C" (* you can record it in the configuration file), start eclipse in the terminal as it is.
Visionary Imaging Services, Inc. Tatsuaki Kobayashi