redhat7.4离线安装tesseract4.0教程及所需源码包
1 rpm -Uvh libgcc-4.8.5-36.el7_6.2.x86_64.rpm (只能root,并且不能指定位置)
2 rpm -Uvh glibc-2.17-260.el7_6.6.x86_64.rpm glibc-common-2.17-260.el7_6.6.x86_64.rpm(互相依赖,只能同时更新)
3 rpm -Uvh zlib-1.2.7-18.el7.x86_64.rpm
4 rpm -ivh libmpc-1.0.1-3.el7.x86_64.rpm
5 rpm -ivh cpp-4.8.5-36.el7_6.2.x86_64.rpm
6 rpm -ivh zlib-devel-1.2.7-18.el7.x86_64.rpm
7 rpm -Uvh libjpeg-turbo-1.2.90-6.el7.x86_64.rpm
8 rpm -Uvh libgomp-4.8.5-36.el7_6.2.x86_64.rpm
9 rpm -ivh m4-1.4.16-10.el7.x86_64.rpm
10 rpm -ivh autoconf-2.69-11.el7.noarch.rpm
11 rpm -ivh perl-Thread-Queue-3.02-2.el7.noarch.rpm
12 rpm -ivh perl-Test-Harness-3.28-3.el7.noarch.rpm
13 rpm -ivh automake-1.13.4-3.el7.noarch.rpm
14 rpm -ivh kernel-headers-3.10.0-957.21.3.el7.x86_64.rpm
15 rpm -ivh glibc-headers-2.17-260.el7_6.6.x86_64.rpm
16 rpm -ivh glibc-devel-2.17-260.el7_6.6.x86_64.rpm
17 rpm -ivh gcc-4.8.5-36.el7_6.2.x86_64.rpm
18 rpm -ivh libtool-2.4.2-22.el7_3.x86_64.rpm
19 rpm -ivh libjpeg-turbo-devel-1.2.90-6.el7.x86_64.rpm
20 rpm -ivh libpng-devel-1.5.13-7.el7_2.x86_64.rpm
21 rpm -ivh libtiff-devel-4.0.3-27.el7_3.x86_64.rpm
安装autoconf-archive
rpm -ivh autoconf-archive-2017.03.21-1.el7.noarch.rpm
安装leptonica
tar -zxvf leptonica-1.74.4.tar.gz
cd leptonica-1.74.4/
./configure
make
make install
安装 libstdc++ gcc-c++ make
1 rpm -Uvh libstdc++-4.8.5-36.el7_6.2.x86_64.rpm
2 rpm -ivh libstdc++-devel-4.8.5-36.el7_6.2.x86_64.rpm
3 rpm -ivh gcc-c++-4.8.5-36.el7_6.2.x86_64.rpm
安装 pkg-config
tar -zxvf pkg-config-0.29.2.tar.gz
cd pkg-config-0.29.2/
./configure --with-internal-glib
make & install make
安装 tesseract-4.0
unzip tesseract-4.0.zip
cd tesseract-4.0
./autogen.sh
./configure --prefix=/home/hcy/soft/ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
make
make install
ldconfig
注意: 安装目录在 /home/hcy/soft/ 执行/home/hcy/soft/bin/tesseract --version 命令,可以查询到版本信息说明安装成功了。
安装语言包
将 eng.traineddata 文件复制到 /home/hcy/soft/share/tessdata 目录下面,如果tesseract选择的是默认的安装路径,则复制到/usr/local/share/tessdata 目录即可
测试
/home/hcy/soft/bin/tesseract ./example.png result
识别结果将会输出到result.txt 中
所需软件包下载:点击下载
所需软件包下载:点击下载
所需软件包下载:点击下载
更多推荐
所有评论(0)