目录
一、报错信息
$ tesseract --list-langs
Error in pixReadMemTiff: function not present
Error in pixReadMem: tiff: no pix returned
Error in pixaGenerateFontFromString: pix not made
Error in bmfCreate: font pixa not made
List of available languages (1):
eng
查看 version 信息,确实没看到 libpng 和 libtiff
$ tesseract -v
tesseract 5.0.0-alpha-20201231-407-g52a8
leptonica-1.81.1
zlib 1.2.11
Found AVX2
Found AVX
Found FMA
Found SSE
Found OpenMP 201511
二、安装依赖库并重新编译 leptonica
安装 libpng 和 libtiff
$ yum install libjpeg-devel libpng-devel libtiff-devel
重新编译 leptonica 并安装
$ cd leptonica-1.81.1
$ make && make install
查看 tesseract 的 version 信息,存在 libpng 和 libtiff 了
$ tesseract -v
tesseract 5.0.0-alpha-20201231-407-g52a8
leptonica-1.81.1
libjpeg 6b (libjpeg-turbo 1.5.3) : libpng 1.6.34 : libtiff 4.0.9 : zlib 1.2.11
Found AVX2
Found AVX
Found FMA
Found SSE
Found OpenMP 201511
列出语言支持,不再报错。
$ tesseract --list-langs
List of available languages (1):
eng