我在做机器人引擎的工作。
使用red构建轻子和tesseract。在运行tesseract时得到以下错误。
[tesseract-ocr]$ tesseract address.png out1
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
Tesseract Open Source OCR Engine v4.00.00alpha with Leptonica
Error in pixReadStreamPng: function not present
Error in pixReadStream: png: no pix returned
Error in pixRead: pix not read
Error during processing.在网上搜索时,我发现这是轻子卡构建的问题。而且它不是用伊蒂夫建造的。实际上,在config.log中,它是通过./配置命令生成的。我能看到下面
configure:12538: checking for TIFFOpen in -ltiff
configure:12564: gcc -o conftest -g -O2 -Wl,-rpath -Wl,/lib64 conftest.c -ltiff -lm
>&5
/bin/ld: cannot find -ltiff然而,我看到libtiff在系统中存在。
[ec2-user@ip-172-31-35-131 lib]$ ldconfig -p | grep libtif
libtiffxx.so.5 (libc6,x86-64) => /lib64/libtiffxx.so.5
libtiff.so.5 (libc6,x86-64) => /lib64/libtiff.so.5我试着指向/lib64路径,这是来自轻子网站[http://www.leptonica.com/source/README.html][1]的引用。
最后,如果您发现安装的程序无法在运行时链接到/usr/local/lib中的已安装库,请尝试以这种方式运行配置: LDFLAGS="-Wl,-rpath -Wl,/usr/-rpath/lib“. /usr/local/lib,这将导致编译器将这些选项传递给链接器。
将LDFLAGS更改为指向/lib64也不起作用。
LDFLAGS="-Wl,-rpath -Wl,/lib64" ./configure
有什么建议吗?
发布于 2018-05-11 05:15:36
试着安装
apt-get install -y libtiff5-dev 然后从源头安装轻子子
git clone https://github.com/DanBloomberg/leptonica.git leptonica
cd leptonica
./autobuild
./configure --with-libtiff
make -j
make install然后重新安装tesseract
https://stackoverflow.com/questions/47270238
复制相似问题